Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Anders Hammarquist
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >> and the Python use is consistent with the rest of computer science. > >The problem isn't the word "reference" in itself, the problem is when people >are implying that "since Python passes object references to functions, it'

Re: Worthwhile to reverse a dictionary

2006-01-07 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: > crc <[EMAIL PROTECTED]> writes: > > I assume your talking about building a new dictionary with the key and > > value pair switched. I have seen no built in function to do this but I > > have found a way to create another dictionary that is the inverse of > >

Re: Try Python update

2006-01-07 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: ... > "Known problems" doesn't have URL (isn't "urlable"?) other than > http://www.mird.org/home/mwm/try_python/. It's on that page - click on s/mird/mired/ -- the URL as given goes to some 'oxide' thing. > "Known Problems" to open up the section. That par

Re: Newbie with some doubts.

2006-01-07 Thread Kent Johnson
Edgar A. Rodriguez wrote: > Hi everybody, > > Im newbie to Python (I found it three weeks ago) , in fact Im newbie to > programming. I'm being reading and training with the language, but I > still wondering about what Classes are used to. Could you please give > me some examples?? This essay give

Re: Returning Values from Bash Scripts

2006-01-07 Thread Steven D'Aprano
On Sat, 07 Jan 2006 22:03:36 -0500, Mike Meyer wrote: > [EMAIL PROTECTED] writes: > >> How to execute bash scripts from python (other than using os.popen) and >> get the values that those bash scripts return. > > The easy way is to call it with subprocess.call. >>> import subprocess Traceback

Re: Help wanted with md2 hash algorithm

2006-01-07 Thread Paul Rubin
[EMAIL PROTECTED] writes: > below you find my simple python version of MD2 algorithm > as described in RFC1319 (http://rfc1319.x42.com/MD2). > It produces correct results for strings shorter than 16 Bytes and wrong > results for longer strings. Why do you want to use MD2? It's very slow and it's

Re: Returning Values from Bash Scripts

2006-01-07 Thread Mike Meyer
[EMAIL PROTECTED] writes: > How to execute bash scripts from python (other than using os.popen) and > get the values that those bash scripts return. The easy way is to call it with subprocess.call. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix con

Re: Newbie with some doubts.

2006-01-07 Thread Mike Meyer
Claudio Grondi <[EMAIL PROTECTED]> writes: > Yes, I see your point, but even putting my personal preferences > beside, for someone who just started to program, learning about the > concept of classes and inheritance is probably not what helps to get > immediate fun out of first steps in writing sma

Re: Help wanted with md2 hash algorithm

2006-01-07 Thread Tom Anderson
On Fri, 6 Jan 2006 [EMAIL PROTECTED] wrote: > below you find my simple python version of MD2 algorithm > as described in RFC1319 (http://rfc1319.x42.com/MD2). > It produces correct results for strings shorter than 16 Bytes and wrong > results for longer strings. > > I can't find what's wrong. > >

Re: Groupkit and python

2006-01-07 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >Hi, >I've built an app using this great software called groupkit >(http://www.groupkit.org/) based on tcl/tk language, now I'd like to >test python possibilities for groupware. Anyone knows about this, I >have made a goo

Re: Returning Values from Bash Scripts

2006-01-07 Thread William Park
[EMAIL PROTECTED] wrote: > HI all, > > How to execute bash scripts from python (other than using os.popen) and > get the values that those bash scripts return. > > I would be happy if someone could help me out in this.. Well, if stdout is not an option, then save it to file (text, GDBM, Python s

Re: Newbie with some doubts.

2006-01-07 Thread Claudio Grondi
Mike Meyer wrote: > Claudio Grondi <[EMAIL PROTECTED]> writes: > >>Edgar A. Rodriguez wrote: >> >>>Hi everybody, >>>Im newbie to Python (I found it three weeks ago) , in fact Im newbie >>>to >>>programming. I'm being reading and training with the language, but I >>>still wondering about what Class

Re: Does Python allow access to some of the implementation details?

2006-01-07 Thread Claudio Grondi
Bengt Richter wrote: > On Sat, 07 Jan 2006 14:05:18 +0100, Claudio Grondi <[EMAIL PROTECTED]> wrote: > [...] > >>What I am also looking for is a conversion to base 256 (i.e where the >>full byte is used and the string and the integer have the same actual >>content if on appropriate endian machin

Re: MVC programming with python (newbie) - please help

2006-01-07 Thread bwaha
"bwaha" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'd appreciate some experience from the gurus out there to help me > understand how to implement MVC design in python code. Thanks for all the help. Also this link was sent to me by pm and I found this very useful too. Its a

Re: Stackless Python

2006-01-07 Thread Xavier Morel
Christian Tismer wrote: > Xavier Morel wrote: > >> Would anyone have more informations about that? It doesn't seem to be an >> issue on my side (since I tried to access the Stackless site from two >> different connections and 3 computers) but I can't rule it out. > > Thanks to Carl Friedrich, I

Re: MVC programming with python (newbie) - please help

2006-01-07 Thread bwaha
"Gerard Flanagan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Gerard Flanagan wrote: > > > bwaha wrote: > > > > > I'd appreciate some experience from the gurus out there to help me > > > understand how to implement MVC design in python code. > > > > > > > Badly snipped, not prete

Re: Newbie with some doubts.

2006-01-07 Thread Mike Meyer
Claudio Grondi <[EMAIL PROTECTED]> writes: > Edgar A. Rodriguez wrote: >> Hi everybody, >> Im newbie to Python (I found it three weeks ago) , in fact Im newbie >> to >> programming. I'm being reading and training with the language, but I >> still wondering about what Classes are used to. Could you

Re: Newbie with some doubts.

2006-01-07 Thread Claudio Grondi
Edgar A. Rodriguez wrote: > Hi everybody, > > Im newbie to Python (I found it three weeks ago) , in fact Im newbie to > programming. I'm being reading and training with the language, but I > still wondering about what Classes are used to. Could you please give > me some examples?? > > Thanks. >

Re: Does Python allow access to some of the implementation details?

2006-01-07 Thread Bengt Richter
On Sat, 07 Jan 2006 14:05:18 +0100, Claudio Grondi <[EMAIL PROTECTED]> wrote: [...] >What I am also looking for is a conversion to base 256 (i.e where the >full byte is used and the string and the integer have the same actual >content if on appropriate endian machine), which would make the bit >

Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Aahz
[contextectomy, because this quote makes no sense with or without context] In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote: > >Right. All references are objects, so "call by object" includes all >the possibilities of "call by reference" as a subset. Not all objects >are refer

Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Mike Meyer
Terry Hancock <[EMAIL PROTECTED]> writes: > On Sat, 07 Jan 2006 01:29:46 -0500 > Mike Meyer <[EMAIL PROTECTED]> wrote: >> From what I can tell, Liskov proposed *three* different >> names for >> passing references to objects: call-by-sharing, >> call-by-object, and call-by-object-reference. > "Call

Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Mike Meyer
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > In ordinary CS, "call by reference" generally means that the function is > handed a reference to the *variable* holding the *value*. That's the strictest definition of "call-by-reference". It's got a major problem in that it means doing (with C syntax)

Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Sat, 07 Jan 2006 01:29:46 -0500, Mike Meyer wrote: >> Call by object is the worst choice among the three, because "object" >> has such a vague meaning, so you never know what implications someone >> will come away with. > So very unlike "call by ref

Re: Try Python update

2006-01-07 Thread Mike Meyer
[EMAIL PROTECTED] (Alex Martelli) writes: > Mike Meyer <[EMAIL PROTECTED]> wrote: >> And yes, I know about this. It's listed in "Known Problems". Anything > What's the URL to "Known Problems"? There's a strange cursor-placement > bug on Apple's Safari browser (not in Firefox), but I don't want to

Re: Help Please: 'module' object has no attribute 'compile'

2006-01-07 Thread Kent Johnson
livin wrote: > I beleive so... I cannot know for sure becasue the models are not > separate... they are in the python23.zlib file... I'm no sure how to check > the file, it looks as if it is compiled (I'm new to python so forgive my > ignorance) Yes, there should be an re module in your Python

Re: Newbie with some doubts.

2006-01-07 Thread Terry Hancock
On 4 Jan 2006 17:36:54 -0800 "Edgar A. Rodriguez" <[EMAIL PROTECTED]> wrote: > Im newbie to Python (I found it three weeks ago) , in fact > Im newbie to programming. I'm being reading and training > with the language, but I still wondering about what > Classes are used to. Could you please give me

Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Terry Hancock
On Sat, 07 Jan 2006 01:29:46 -0500 Mike Meyer <[EMAIL PROTECTED]> wrote: > From what I can tell, Liskov proposed *three* different > names for > passing references to objects: call-by-sharing, > call-by-object, and call-by-object-reference. "Call by object reference" makes the most sense to me. Na

Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Fredrik Lundh
Bryan Olson wrote: > > Words are important -- not only for what they mean, but for what the > > connotations they carry. For people who come to Python from C-like > > languages, the word "reference" means something that is just not true in > > the context of Python's behaviour. > > Wrong. C does n

Re: Stackless Python

2006-01-07 Thread Christian Tismer
Xavier Morel wrote: > Would anyone have more informations about that? It doesn't seem to be an > issue on my side (since I tried to access the Stackless site from two > different connections and 3 computers) but I can't rule it out. Thanks to Carl Friedrich, I restarted the Zope process. I hav

Re: Copy an Object (Again?)

2006-01-07 Thread Alex Martelli
KraftDiner <[EMAIL PROTECTED]> wrote: ... > objs = myListOfObjects > for obj in objs: >if obj.flag: > newObject = copy.deepcopy(obj) > newObject.mirror() > myListOfObjects.append(newObject) Never modify the very list you're looping on. I doubt this is the root of your pro

Re: What's wrong with this code snippet?

2006-01-07 Thread Alex Martelli
LordLaraby <[EMAIL PROTECTED]> wrote: > For what it's worth, GenerateRandomColour does not access any instance > variables and therefore needn't even be a member of the class > Population. If you wanted it there for encapsulation purposes, consider > making it a staticmethod like so: > > @sta

Re: Try Python update

2006-01-07 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: > And yes, I know about this. It's listed in "Known Problems". Anything What's the URL to "Known Problems"? There's a strange cursor-placement bug on Apple's Safari browser (not in Firefox), but I don't want to add a bug report if you already know about it -

Re: Does Python allow access to some of the implementation details?

2006-01-07 Thread Carl Friedrich Bolz
Paul Rubin wrote: > Claudio Grondi <[EMAIL PROTECTED]> writes: > >>The question is if Python allows somehow access to the bytes of the >>representation of a long integer or integer in computers memory? > > > No it doesn't, and that's a good thing, since the internal > representation is a little

Re: Double Click Mouse Event in Tkinter

2006-01-07 Thread Fredrik Lundh
"scott_gui" wrote: > Creating a Windows application: > mouse event has a conflict when there is also a > binding to the event. It seems like a silly oversight that > performing a double click will also initiate the single click action. If your design depends on your code being able to accuratel

Re: Does Python allow access to some of the implementation details?

2006-01-07 Thread Claudio Grondi
Paul Rubin wrote: > Claudio Grondi <[EMAIL PROTECTED]> writes: > >>The question is if Python allows somehow access to the bytes of the >>representation of a long integer or integer in computers memory? > > > No it doesn't, and that's a good thing, since the internal > representation is a little

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-07 Thread Alex Martelli
Anton Vredegoor <[EMAIL PROTECTED]> wrote: > However I still maintain that I was never able to meet these fine > people you speak about and which you seem to know because the cost > involved (a few hundred euro to visit pycon for example) was too high > compared to my food budget. Europython is c

Re: Does Python allow access to some of the implementation details?

2006-01-07 Thread Alex Martelli
Claudio Grondi <[EMAIL PROTECTED]> wrote: ... > What I am also looking for is a conversion to base 256 (i.e where the > full byte is used and the string and the integer have the same actual > content if on appropriate endian machine), which would make the bit gmpy supplies that, too: gmpy.bi

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Alex Martelli
Ben Sizer <[EMAIL PROTECTED]> wrote: ... > assignment semantics that differ from languages such as C++ and Java, > not the calling mechanism. In C++, assignment means copying a value. In > Python, assignment means reassigning a reference. And in Java, it means just the same as in Python (with s

Re: Double Click mouse event problems

2006-01-07 Thread Scott David Daniels
scott_gui wrote: > I am creating a Windows application: > The mouse event has a conflict when the > event also has a binding. Double clicks will first perform the single > click action. This seems a little silly. > > Anyone know how to circumvent this? Right now I am having the function > that i

Re: Help Please: 'module' object has no attribute 'compile'

2006-01-07 Thread livin
I beleive so... I cannot know for sure becasue the models are not separate... they are in the python23.zlib file... I'm no sure how to check the file, it looks as if it is compiled (I'm new to python so forgive my ignorance) "Kent Johnson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROT

Re: Spelling mistakes!

2006-01-07 Thread Scott David Daniels
Terry Hancock wrote: > One thing I've figured out is that using the full spelling > of a word instead of groovy programmer abbreviations makes > it a lot easier to remember the names of things. Of course, > like everything, that can be taken too far, so I still use > things like "bkg_clr" too. Ye

Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Bryan Olson
Steven D'Aprano wrote: > Bryan Olson wrote: >>Wrong. C does not have references, and the Python use is consistent >>with the rest of computer science. You seem to have read in things >>that it does not mean. Fix *your* thinking. > > > Bryan, I'll admit that I'm no C/C++ programmer, and I frequent

Re: Spelling mistakes!

2006-01-07 Thread Aahz
In article <[EMAIL PROTECTED]>, Alan Kennedy <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] >> >> Aside from the other responses (unittests, pychecker/pylint), you might also >> consider using __slots__ for new-style classes: > >I've been shouted at for suggesting exactly that! :-) > >http://groups

Re: urllib2 and proxies support ?

2006-01-07 Thread DH
tomazi75-nospam(at)gmail.com wrote: > Hello all, > > I've a problem using urllib2 with a proxy which need authentication. > I don't have a way to test this myself but you can try the suggestion at the bottom of this page: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52199 Move your na

BayPIGgies: January 12, 7:30pm (Google)

2006-01-07 Thread Aahz
The next meeting of BayPIGgies will be Thurs, January 12 at 7:30pm at Google, room Tunis. Meet in the lobby of building 43. This will be a combo meeting: * First Marilyn Davis will practice her "Why Python?" talk -- she's looking for feedback and suggestions on improving it. * We'll fill the re

Re: Optional typecheck

2006-01-07 Thread DH
Gregory Petrosyan wrote: > Hello all! Please enlighten me about optional typecheck: > > 1) Will it be available in Python 2.5? > 2) Will it support things like > > def f(a: int | float) > > 3) Will it support interface checking like > > def g(a: BookInterface) > > or even mix like > > def k(a

Re: How to format and print text.

2006-01-07 Thread Grant Edwards
On 2006-01-07, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2006-01-07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> Have been messing with python, but could´nt find out >> how to do printing with different Fonts. >> Any suggestions? > > Output postscript. Reportlab seems to be a popular way

Re: Translate this to python?

2006-01-07 Thread Robert Kern
Paul Rubin wrote: > Heiko Wundram <[EMAIL PROTECTED]> writes: >>Unless of course range() becomes "more clever" and returns an iterator in >>case the amount of memory to store the needed range is too large... > > That could break things. Range is supposed to return a list. Except that we're talk

Re: question about mutex.py

2006-01-07 Thread Kent Johnson
Jean-Paul Calderone wrote: > Did you read the module docstring? > >Of course, no multi-threading is implied -- hence the funny interface >for lock, where a function is called once the lock is aquired. > > If you are looking for a mutex suitable for multithreaded use, see the > threading

Re: Spelling mistakes!

2006-01-07 Thread skip
>> Aside from the other responses (unittests, pychecker/pylint), you >> might also consider using __slots__ for new-style classes: Alan> I've been shouted at for suggesting exactly that! :-) Maybe Aahz didn't notice my post. The OP sort of seemed like he was pining for attribute dec

Re: Stackless Python

2006-01-07 Thread Carl Friedrich Bolz
Xavier Morel wrote: > I managed to find some documentations and papers, but most if not all of > them are related to pre-2.0 Stackless. The issue is, I just can't seem > to reach the Stackless website (http://stackless.com). Some specific > pages of the site do work (http://stackless.com/spcpape

Re: How to format and print text.

2006-01-07 Thread Grant Edwards
On 2006-01-07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Have been messing with python, but could´nt find out > how to do printing with different Fonts. > Any suggestions? Output postscript. -- Grant Edwards grante Yow! Did we bring enough

Stackless Python

2006-01-07 Thread Xavier Morel
Some time ago, I finally decided to check what Stackless was (exactly) and which were the theorical concepts behind it (continuations and all). I managed to find some documentations and papers, but most if not all of them are related to pre-2.0 Stackless. The issue is, I just can't seem to reac

Re: Calling foreign functions from Python? ctypes?

2006-01-07 Thread Carl Friedrich Bolz
Jean-Paul Calderone wrote: > > I could probably dig up a few more, if you want. So what's ctypes on top of > this? > another one: [EMAIL PROTECTED]:~$ python Python 2.4.2 (#2, Sep 30 2005, 21:19:01) [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2 Type "help", "copyright",

Re: Does Python allow access to some of the implementation details?

2006-01-07 Thread Martin v. Löwis
Claudio Grondi wrote: >> You can get somewhat faster in Python than your code if you avoid >> producing new long objects all the time, and do the task in chunks of 30 >> bits. > > It would be nice if you could explain why you consider chunks of 30 bits > to be superior e.g. to chunks of 32 bits?

Re: config errors on Freebsd and python 2.3

2006-01-07 Thread Safeer Tabassum
why you are not installing it from ports? ""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > David Bear wrote: >> I don't plan on using curses -- so I'd like to ignore this. But, I'm just >> wondering if there is an 'easy' fix... > > Not really, no. It's safe to ig

Re: Spelling mistakes!

2006-01-07 Thread Alan Kennedy
[EMAIL PROTECTED] > Aside from the other responses (unittests, pychecker/pylint), you might also > consider using __slots__ for new-style classes: I've been shouted at for suggesting exactly that! :-) http://groups.google.com/group/comp.lang.python/msg/fa453d925b912917 how-come-aahz-didn't-shout

Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Steven D'Aprano
On Sat, 07 Jan 2006 11:20:25 +, Bryan Olson wrote: > Wrong. C does not have references, and the Python use is consistent > with the rest of computer science. You seem to have read in things > that it does not mean. Fix *your* thinking. Bryan, I'll admit that I'm no C/C++ programmer, and I fre

How to format and print text.

2006-01-07 Thread tjerk
Have been messing with python, but could´nt find out how to do printing with different Fonts. Any suggestions? Herdsman -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt Access Violations

2006-01-07 Thread Phil Thompson
On Saturday 07 January 2006 1:06 pm, gregarican wrote: > I noticed that when I invoked the setCentralWidget() method using PyQt > 3.13 on Python 2.3.5 opening and closing a widget associated with a > main window would result in a Win32 access violation crash after a > couple of times. Here's a gene

Re: [OT] - Requesting Comments for Process Definition and Presentation

2006-01-07 Thread Ilias Lazaridis
Xavier Morel wrote: > Ilias Lazaridis wrote: > >> b) to retrieve feedback subjecting the Process Definition itself >> (content of diagramms, clarity, terminology etc.) > > You are merely some kind of strange troll. You've built something that [...] - (off topic comments) note to readers: most o

Re: Spelling mistakes!

2006-01-07 Thread Peter Hansen
Sam Pointon wrote: > What's worse is the closely related problem of British/American > English, though you sort of get used to it after typing > s/colour/color/g or s/serialise/serialize/g for the thousandth time. > The words look wrong to me, but they're correct in the context. Hah! Canucks r00l

Re: PIL implementation

2006-01-07 Thread Claudio Grondi
circusdei wrote: > I wrote this snippet with the intention of -- capturing a section of > the screen whenever it changes. It could be implemented to log any > sort of messaging system ( by saving consecutive images eg. > 1.png...etc). > > #code > > import Image > import Imag

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-07 Thread Ilias Lazaridis
Ilias Lazaridis wrote: [...] >>> For Software Engineer: >>> >>> """ >>> Requirements: >>> >>>* BS or MS in Computer Science or equivalent (PhD a plus). >> >> Right here. > > This requirement is really funny. > > I thought google is somehow different. [...] from within this thread: http://gro

Re: python speed

2006-01-07 Thread Xavier Morel
James Tanis wrote: > Quite honestly I've never heard of java being faster than.. well.. > anything. Faster than Python? I really doubt it. Their are several > libraries for game programming specifically as well as opengl, sdl, as > well as several different audio systems/daemons.. I'd suggest brow

Re: Converting milliseconds to human amount of time

2006-01-07 Thread Max
Harlin Seritt wrote: > How can I take a time given in milliseconds (I am doing this for an > uptime script) and convert it to human-friendly time i.e. "4 days, 2 > hours, 25 minutes, 10 seonds."? Is there a function from the time > module that can do this? > > Thanks, > > Harlin Seritt > second

Re: download full sites?

2006-01-07 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > hi, does anyone know of any package that will download a full site for > offline viewing? It will change all url to match local urls and follow > a logical structure (the site's structure would be suffice).. Please > tell me if you have heard of such a package.. thanks al

PyQt Access Violations

2006-01-07 Thread gregarican
I noticed that when I invoked the setCentralWidget() method using PyQt 3.13 on Python 2.3.5 opening and closing a widget associated with a main window would result in a Win32 access violation crash after a couple of times. Here's a generic snippet: class Application_Window(QMainWindow): def _

Re: Does Python allow access to some of the implementation details?

2006-01-07 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > Claudio Grondi wrote: > >>Martin v. Löwis wrote: >> >>>You can get somewhat faster in Python than your code if you avoid >>>producing new long objects all the time, and do the task in chunks of 30 >>>bits. >> >>It would be nice if you could explain why you consider chunk

Optional typecheck

2006-01-07 Thread Gregory Petrosyan
Hello all! Please enlighten me about optional typecheck: 1) Will it be available in Python 2.5? 2) Will it support things like def f(a: int | float) 3) Will it support interface checking like def g(a: BookInterface) or even mix like def k(a: file | BookInterface) 4) Will it support things li

Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-07 Thread R. Bernstein
Mike Meyer <[EMAIL PROTECTED]> writes: > But if I had to choose between being > able to play with objects interactively or being able to step through > code, I'll take the interactive interpreter every time. Why would you have to choose? You've created a straw-man argument. No one has previously

Re: Visualisation Engine for Python

2006-01-07 Thread rodmc
Thanks for all the help everyone. rod -- http://mail.python.org/mailman/listinfo/python-list

Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Steven D'Aprano
On Sat, 07 Jan 2006 01:29:46 -0500, Mike Meyer wrote: > Call by object is the worst choice among the three, because "object" > has such a vague meaning, so you never know what implications someone > will come away with. So very unlike "call by reference", right? -- Steven. -- http://mail.py

Re: Is 'everything' a refrence or isn't it?

2006-01-07 Thread Bryan Olson
Steven D'Aprano wrote: > On Thu, 05 Jan 2006 05:21:24 +, Bryan Olson wrote: > > >>Steven D'Aprano wrote: >> >>>Mike Meyer wrote: >> >>[...] >> Correct. What's stored in a list is a reference. >>> >>>Nonsense. What is stored in the list is an object. >> >>According to the Python Language R

Re: Spelling mistakes!

2006-01-07 Thread Sam Pointon
[EMAIL PROTECTED] wrote: > >> In fact, googling for "referer" and "referrer" reports a similar > >> number of hits, unlike most misspellings. > > Terry> You know, I almost mentioned that myself. Drives me crazy. > > Me too. I'm one of those people who, for better or worse, is a good > spel

Re: csv format to DBase III format

2006-01-07 Thread Peter Otten
William wrote: > Peter Otten wrote: >> [EMAIL PROTECTED] wrote: >> >> > I need to transfer csv format file to DBase III format file. >> > How do i do it in Python language? >> >> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362715 > I create a dbf file, it can be opened by Excel but it

Re: Copying files between different linux machines

2006-01-07 Thread Mike Meyer
"Thierry Lam" <[EMAIL PROTECTED]> writes: > Let's say I have two linux machines with the following names: > -linone > -lintwo > > If I'm currently on linone and if I want to copy a bunch of files from > lintwo into linone, how can that be done in a python script without > using ftp? Use scp.

Re: multiple clients updating same file in ftp

2006-01-07 Thread Mike Meyer
"Fuzzyman" <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: >> > here's a simple-minded suggestion: have the first client create a text >> > file on the remote server, and delete it when it is finished updating. >> > The second client can check for

Re: Copying files between different linux machines

2006-01-07 Thread selffrag
I'll presume you have ssh, scp on both boxes $ man ssh $ man scp $scp mydata.dat [EMAIL PROTECTED]:mydata.dat -- http://mail.python.org/mailman/listinfo/python-list

Re: download full sites?

2006-01-07 Thread linuxfreak
Try curl...its pretty cool.. and also wget... -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting milliseconds to human time

2006-01-07 Thread Paul Rubin
Paul Rubin writes: > def dhms(m,t): >if not t: return (m,) >return rl(m//t[0], t[1:]) + (m % t[0],) Editing error, sigh. Meant of course to say >return dhms(m//t[0], t[1:]) + (m % t[0],) -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting milliseconds to human time

2006-01-07 Thread Paul Rubin
"Harlin Seritt" <[EMAIL PROTECTED]> writes: > I would like to take milliseconds and convert it to a more > human-readable format like: > > 4 days 20 hours 10 minutes 35 seconds # To iterate is human; to recurse, divine. def dhms(m,t): if not t: return (m,) return rl(m//t[0], t[1:]) + (m % t

wxPython installation woes on OpenSUSE

2006-01-07 Thread linuxfreak
Hi all, I downloaded the wxpython2.6 tar ball and tried building an rpm from it in an opensuse 10 computer. The command i used was rpmbuild -tb The build worked fine and i found an 3 rpms in /usr/src/packages/RPMS/i586 Then proceeded to install the which went without any hiccups... but when i

Re: libpython2.4.so

2006-01-07 Thread Levi Campbell
ahh, it all makes sense now, thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Try Python update

2006-01-07 Thread Devan L
Mike Meyer wrote: > Xavier Morel <[EMAIL PROTECTED]> writes: [Old message and Xavier's question] [Mike's reply to Xavier] > > > Since Python doesn't have any way to secure the interface built-in, > > i'd be interrested in that. > > Devan apparently doesn't have as cooperative an ISP, and is working

Re: error rising while connecting oracle 9i

2006-01-07 Thread [EMAIL PROTECTED]
Check: 1. Whta is the Python version your running, with py> import sys py> print sys.version 2.4.2 (#2, Sep 30 2005, 21:19:01) [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] 2. Download the correct version of cx_Oracle see http://www.cxtools.net/default.aspx?nav=cxorlb then execute the c

Re: Xah's Edu Corner: the bug-reporting attitude

2006-01-07 Thread rurpy
Apoologies for the multiple posts -- please blame Google. -- http://mail.python.org/mailman/listinfo/python-list

Double Click mouse event problems

2006-01-07 Thread scott_gui
I am creating a Windows application: The mouse event has a conflict when the event also has a binding. Double clicks will first perform the single click action. This seems a little silly. Anyone know how to circumvent this? Right now I am having the function that is bound to the double click eve

Re: Converting milliseconds to human time

2006-01-07 Thread rurpy
"Max Erickson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > the hard way(in that you have to do it yourself): > > def prntime(ms): > s=ms/1000 > m,s=divmod(s,60) > h,m=divmod(m,60) > d,h=divmod(h,24) > return d,h,m,s Or abstracted... def decd (n, base): """ Decom

Re: MVC programming with python (newbie) - please help

2006-01-07 Thread Gerard Flanagan
Gerard Flanagan wrote: > bwaha wrote: > > > I'd appreciate some experience from the gurus out there to help me > > understand how to implement MVC design in python code. > > > Badly snipped, not pretending to be a 'guru' Gerard -- http://mail.python.org/mailman/listinfo/python-list

Help wanted with md2 hash algorithm

2006-01-07 Thread wjb131
hi all, below you find my simple python version of MD2 algorithm as described in RFC1319 (http://rfc1319.x42.com/MD2). It produces correct results for strings shorter than 16 Bytes and wrong results for longer strings. I can't find what's wrong. Can anybody help? Regards Wolfgang

Re: Occasional OSError: [Errno 13] Permission denied on Windows

2006-01-07 Thread Alec Wysoker
I tried something not exactly like this, but in the same spirit. I don't generally have a list of files I want to delete - just one. I try to delete it and if I get errno 13 I sleep for a little while (0.2) and then try again. If the same problem then I add 1 sec to the sleep time and try again.

Copying files between different linux machines

2006-01-07 Thread Thierry Lam
Let's say I have two linux machines with the following names: -linone -lintwo If I'm currently on linone and if I want to copy a bunch of files from lintwo into linone, how can that be done in a python script without using ftp? Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-li

Re: MVC programming with python (newbie) - please help

2006-01-07 Thread Gerard Flanagan
bwaha wrote: > I'd appreciate some experience from the gurus out there to help me > understand how to implement MVC design in python code. > I'm neither a guru nor an expert, have never used wxpython, and am not qualified to advise on MVC!! But until someone more qualified arrives here's some cod

Double Click mouse event problems

2006-01-07 Thread scott_gui
I tried to post this a few seconds ago and isn't showing. My apologies if it posts twice. I am creating a Windows application: The mouse event has a conflict when the event also has a binding. Double clicks will first perform the single click action. This seems a little silly. Anyone know how t

Double Click Mouse Event in Tkinter

2006-01-07 Thread scott_gui
Creating a Windows application: mouse event has a conflict when there is also a binding to the event. It seems like a silly oversight that performing a double click will also initiate the single click action. Has anyone figured out a way to circumvent this problem? Right now I am making the Doub

Re: Occasional OSError: [Errno 13] Permission denied on Windows

2006-01-07 Thread Alec Wysoker
> File attributes may be an issue to. Take look at the recipe at: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303343 > which ensures the file attributes are normal before you delete it. I don't think file attributes are an issue, because generally I can manually delete the file in

Re: Microsoft IronPython?

2006-01-07 Thread sam
After downloading and trying out Ironpython, I have the following comments: 1) I like the idea of Python under .net 2) I like the support for both Microsoft math lib,and Python's math lib Will Microsoft maintain the compatability between standard python with the addition of their libs? -- http://

Re: C regex equiv to Python implementation?

2006-01-07 Thread techiepundit
Ganesan, I'm trying to stay portable between Windows and Linux. My app will run on Linux when deployed. But we do a lot of simulation on Windows because of better dev tools available on Windows. So I really want a regular expression implementation that'll compile under MS VS 2003 C++ and also und

Renaming files in ftplib

2006-01-07 Thread Thierry Lam
Let's say I have a file called 'test.c' on my local machine and I'm ftping a file with similar name from a remote computer. I want to prefix the file ftped over with a T_, how do I do that through ftplib in python? Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >