IconvCodec, UTF-32 & P4 ?

2005-03-20 Thread Do Re Mi chel La Si Do
Hi ! Iconvcodec was good, for to work with UTF-32, with Python 2.3 But, which tool, for the same use, with Python 2.4 ? Thanks for suggestions. Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Python limericks (was Re: Text-to-speech)

2005-03-20 Thread Brian van den Broek
Steve Holden said unto the world upon 2005-03-20 16:18: Since it's PyCon week, I will offer a prize of $100 to the best (in my opinion) limerick about Python posted to this list (with a Cc: to [EMAIL PROTECTED]) before midday on Friday. The prize money will be my own, so there are no other rule

Re: exec src in {}, {} strangeness

2005-03-20 Thread Do Re Mi chel La Si Do
Hi ! Try : exec f in globals(),locals() or exec(f,globals(),locals()) or exec f in globals(),globals() or exec(f,globals(),globals()) @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: (",) Do You Want To Know For Sure You Are Going To Heaven?

2005-03-20 Thread Chris Rebert (cybercobra)
Please do STFU! You are most annoying and this is the wrong place to post this. If anyone else if reading this, yes, I do realize it's probably a bot. But I need to vent some rage. Now if only his nick didn't have a "..." in it... I would so report it to yahoo and/or counterspam it. -- http://mai

Re: For loop extended syntax

2005-03-20 Thread Kay Schluehr
George Sakkis wrote: > > Looks very appealing, but what to do with > > > > [x*y-z for (x=0,y,z) in (1,2,3), (4,5), (6,7,8)] ? > > > > Should it raise an exception due to a pattern mismatch? > > I didn't have in mind to generalize the syntax even more than the respective > for function > signatures

Re: Event Handeling Between Two wxPanles in A wxNotebook

2005-03-20 Thread F. GEIGER
My DataPool then is a singleton, well, actually, a Borg. See Alex Martelli's recipe for that. If you use new style classes, then you have to look for "Singleton" in the cookbook. HTH Franz GEIGER "MyHaz" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > so you run data pool as

Re: printing anomaly

2005-03-20 Thread Greg Ewing
Paul Rubin wrote: What's the deal with this? >>> print 3.2 3.2 >>> print [3.2] [3.2002] >>> Yes, I know that 3.2 isn't an exact binary fraction. I'm wondering why it's converted differently depending on whether it's in a list. It's not. The difference is that prin

Re: Pre-PEP: Dictionary accumulator methods

2005-03-20 Thread Ron
On Sun, 20 Mar 2005 15:14:22 -0800, David Eppstein <[EMAIL PROTECTED]> wrote: >In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Aahz) >wrote: > >> >I am surprised nobody suggested we put those two methods into a >> >separate module (say dictutils or even UserDict) as functions: >> > >> >from di

exec src in {}, {} strangeness

2005-03-20 Thread Stefan Seefeld
hi there, I have trouble running some python code with 'exec': t.py contains: class Foo: pass class Bar: f = Foo From a python shell I do: >>> f = ''.join(open('t.py').readlines()) >>> exec f in {}, {} Traceback (most recent call last): File "", line 1, in ? File "", line 2, in ? File "",

Re: How to create stuffit files on Linux?

2005-03-20 Thread Greg Ewing
Leif K-Brooks wrote: Noah wrote: The problem is that my users want to see .sit files. I know it's sort of silly. Zip files are foreign and frightening to them. Would Stuffit open zip files renamed to .sit? Yes! I just tried it, and it works. -- Greg Ewing, Computer Science Dept, University of Cante

RE: IORCC Crossword and Wordfind Puzzles

2005-03-20 Thread iorcc
Hello Fellowist Rubyist (and scripters of all flavor) Here is a neat Ruby-centric 84 word crossword puzzle. To follow will be the word find for solution words. Its not too hard, but a good strong search engine and some knowledge of Ruby helps. I found all but 10 or so words/questions online. S

Python limericks (was Re: Text-to-speech)

2005-03-20 Thread Tim Churches
Steve Holden wrote: > Tim Churches wrote: >> There once was a language called Python... >> >> (which is pretty close to having three anapaestic left feet) >> >> or more promisingly, rhyme-wise, but metrically rather worse : >> >> There once was a mathematician named van Rossum... >> >> Tim C >> > O

PyPI errors?

2005-03-20 Thread Daniel Yoo
Does anyone know why PyPI's doesn't like my PKG-INFO file? Here's what I have: ## mumak:~/work/aho/src/python/dist/ahocorasick-0.8 dyoo$ cat PKG-INFO Metadata-Version: 1.0 Name: ahocorasick Version: 0.8 Summary: Aho-Corasick automaton implementation Home-page: http://hkn.eecs.berkeley.edu/~

(",) Do You Want To Know For Sure You Are Going To Heaven?

2005-03-20 Thread Ron038548
http://www.want-to-be-sure.blogspot.com << Click On Link -- http://mail.python.org/mailman/listinfo/python-list

Re: Overloaded Constructors?!?

2005-03-20 Thread Paul McGuire
>>Another way is to make two factory methods that >>create instances of the class and do the correct initialization. >I am sorry to be so tedious, but I am still quite a >newbie in Python... could you please provide a very >small example of your last sentence? Looks >quite interesting... See the

Re: Import mechanism to support multiple Python versions

2005-03-20 Thread Greg Ewing
Nicolas Fleury wrote: All my code in under a single package. Is it possible to override the import mechanism only for modules under that package and sub-packages so that?: Yes. A package module has a __path__ attribute to which you can add additional directories to be searched for submodules of

Re: printing anomaly

2005-03-20 Thread Erik Max Francis
Paul Rubin wrote: What's the deal with this? >>> print 3.2 3.2 >>> print [3.2] [3.2002] >>> Yes, I know that 3.2 isn't an exact binary fraction. I'm wondering why it's converted differently depending on whether it's in a list. repr vs. str. The str of the sequenc

Re: printing anomaly

2005-03-20 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: > What's the deal with this? > > >>> print 3.2 > 3.2 > >>> print [3.2] > [3.2002] > >>> > > Yes, I know that 3.2 isn't an exact binary fraction. I'm wondering > why it's converted diff

RE: printing anomaly

2005-03-20 Thread Delaney, Timothy C (Timothy)
Paul Rubin wrote: > What's the deal with this? > > >>> print 3.2 > 3.2 > >>> print [3.2] > [3.2002] > >>> > > Yes, I know that 3.2 isn't an exact binary fraction. I'm wondering > why it's converted differently depending on whether it's in a list. `print 3.2` ==

Re: Lowest hassle Python web server?

2005-03-20 Thread Gerhard Häring
kanzen wrote: I keep telling my friends that Python rocks. Now it's time to put my money where my mouth is. I'm about to start writing a server for a phone based game. It needs to handle simlpe requests from some Java code running on the phone at a fairly low transaction rate. There will also be a

printing anomaly

2005-03-20 Thread Paul Rubin
What's the deal with this? >>> print 3.2 3.2 >>> print [3.2] [3.2002] >>> Yes, I know that 3.2 isn't an exact binary fraction. I'm wondering why it's converted differently depending on whether it's in a list. -- http://mail.python.org/mailman/listinfo/python-lis

Re: Overloaded Constructors?!?

2005-03-20 Thread Shalabh Chaturvedi
[EMAIL PROTECTED] wrote: Hello NG, I am trying to port a useful class from wxWidgets (C++) to a pure Python/wxPython implementation. In the C++ source code, a unique class is initialized with 2 different methods (???). This is what it seems to me. I have this declarations: The 2 different in

Re: [DB-SIG] Sybase module 0.37pre2 released

2005-03-20 Thread Dave Cole
Dave Cole wrote: The module is available here: http://www.object-craft.com.au/projects/sybase/download/sybase-0.37pre1.tar.gz Ooops. Make that: http://www.object-craft.com.au/projects/sybase/download/sybase-0.37pre2.tar.gz - Dave -- http://www.object-craft.com.au -- http://mail.python.org/mailman

Re: FAQ 1.7.3 : How can I have modules that mutually import each other

2005-03-20 Thread John Roth
Circular import dependencies don't work well; depending on the exact conditions they can leave you pulling your hair out for hours. In your example, just pull the global variable out into a third module and have both of your major modules import and reference it from there. In general, you should

Re: simultaneous copy to multiple media

2005-03-20 Thread Diez B. Roggisch
> Well, 430 MB/s is only for USB 2.0. AFAIK, most devices (esp. storage > devices) are still only USB 1.1 compliant, which makes this rate go down > to a mere 40 MB/s or something close. I think it is 430 MBit(!), so about 50MB per second. The old usb 1.1 has 12MBits. So I don't think that Claudio

Re:[perl-python] a program to delete duplicate files

2005-03-20 Thread Xah Lee
Sorry i've been busy... Here's the Perl code. I have yet to clean up the code and make it compatible with the cleaned spec above. The code as it is performs the same algorithm as the spec, just doesn't print the output as such. In a few days, i'll post a clean version, and also a Python version, a

Re: Overloaded Constructors?!?

2005-03-20 Thread Michael Spencer
[EMAIL PROTECTED] wrote: [trying to create a single Python class with the equivalent of the following overloaded constructors] wxFoldWindowItem(wxWindow *wnd, int flags = wxFPB_ALIGN_WIDTH, int ySpacing = wxFPB_DEFAULT_YSPACING, int leftSpacing = wxFPB_DEFAULT_LE

Re: HTML editor component?

2005-03-20 Thread Lars Heuer
Hi skol, >>> Is there any HTML WYSIWYG editor component available for >>> Python/wxPython? Thanks. >> >> There is wxMozilla: http://wxMozilla.sf.net/ > Thanks for the tip. Looks like a very elaborate component. > Is there anything simpler? I'd need just simple HTML editing > with formatting (bold

Re: Pre-PEP: Dictionary accumulator methods

2005-03-20 Thread David Eppstein
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Aahz) wrote: > >I am surprised nobody suggested we put those two methods into a > >separate module (say dictutils or even UserDict) as functions: > > > >from dictutils import tally, listappend > > > >tally(mydict, key) > >listappend(mydict, key,

Re: Lowest hassle Python web server?

2005-03-20 Thread Adonis
kanzen wrote: I keep telling my friends that Python rocks. Now it's time to put my money where my mouth is. I'm about to start writing a server for a phone based game. It needs to handle simlpe requests from some Java code running on the phone at a fairly low transaction rate. There will also be a

Sybase module 0.37pre2 released

2005-03-20 Thread Dave Cole
WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. NOTES: This release contains a number of small bugfixes and patches received from users. I have been unable to find the sourc

Re: Shell re-direction

2005-03-20 Thread Jeff Epler
buffering. In the first case, there is either no buffering, or line buffering on sys.stdout, so you see the lines in order. In the second case, there is a buffer of a few hundred or thousand bytes for stdout in the python process, and you see the two lines of python output together (in this case,

Re: HTML editor component?

2005-03-20 Thread skol
"Lars Heuer" <[EMAIL PROTECTED]> wrote >> Is there any HTML WYSIWYG editor component available for >> Python/wxPython? Thanks. > > There is wxMozilla: http://wxMozilla.sf.net/ Thanks for the tip. Looks like a very elaborate component. Is there anything simpler? I'd need just simple HTML editing w

Re: How to create an object instance from a string??

2005-03-20 Thread Max M
Tian wrote: How can I create an instance of an object from a string? For example, I have a class Dog: class Dog: def bark(self): print "Arf!!!" def Factory(class_name): classes = { 'Dog':Dog } return classes[class_name] dog = Factory('Dog')() -- hilsen/regards Max M

Shell re-direction

2005-03-20 Thread Mike Gould
Hi all, I have a very strange problem with the output run from commands run via os.system(). If the python script is run without re-direction the output appears as expected, but if I re-direct the output from the script the output gets re-ordered. For example given the following script: import

Re: simultaneous copy to multiple media

2005-03-20 Thread Jacek Trzmiel
Claudio Grondi wrote: > I am on a Widows 2000 box using the NTFS file system. > Both up to now suggested approaches as > - tee.exe (where I used the http://david.tribble.com/dos/tee.exe > DOS-port with redirecting stdout to NULL) and > - parallel copy (hoping caching does the job) are by far > slo

I'm just an idiot when it comes logging

2005-03-20 Thread olsongt
I'm trying to be a good boy and use the logging module but it's behaving rather counter-intuitively. I've posted a simplified test script below. To summarize, I've set the basic config to only log root level messages with >= ERROR level. I've created another named logger that logs on info level.

Re: HTML editor component?

2005-03-20 Thread Lars Heuer
Hi skol, > Is there any HTML WYSIWYG editor component available for > Python/wxPython? Thanks. There is wxMozilla: http://wxMozilla.sf.net/ Best regards, Lars -- http://semagia.com -- http://mail.python.org/mailman/listinfo/python-list

Overloaded Constructors?!?

2005-03-20 Thread andrea_gavana
Hello Kent, thank you a lot for your answer. I was starting to think that my question was a little bit strange to obtain an answer... >This is a strange design. My first reaction is, why do you want to do that? Maybe you >should split the class in two? You are right. The problem is that this

Re: Lowest hassle Python web server?

2005-03-20 Thread Peter Hansen
kanzen wrote: - Does threading cause any more of a hassle in Python than Java? What hassles have you had? I thought threads in Java were pretty straightforward. In any case, in Python they are generally very easy to use, provided you have a basic knowledge of thread safety issues and/or provided

Re: getting text from WinXP console

2005-03-20 Thread Peter Hansen
Chris Rebert (cybercobra) wrote: You want the function raw_input(). Have you read the tutorial? I should have been covered there. I'm pretty sure he's looking for a means of capturing the entire contents of a console window, not just letting the user enter some textual input. To the OP: this is an

HTML editor component?

2005-03-20 Thread skol
Is there any HTML WYSIWYG editor component available for Python/wxPython? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: simultaneous copy to multiple media

2005-03-20 Thread Heiko Wundram
Am Sonntag, 20. März 2005 23:16 schrieb Claudio Grondi: > 2) if I understand it right, an USB controller is connected to > to the PCI bus and there can be many separate USB > controller on one PC Yes, there may be more than one USB-controller in a PC, but this doesn't matter, they are all connect

Re: For loop extended syntax

2005-03-20 Thread George Sakkis
"Heiko Wundram" <[EMAIL PROTECTED]> wrote: > Am Sonntag, 20. März 2005 22:22 schrieb George Sakkis: > > Once more, the 2D/3D example was just that, an example; my point was not to > > find a specific solution to a specific problem. > > And my point being: it's simple enough to give a general recip

Re: Overloaded Constructors?!?

2005-03-20 Thread Kent Johnson
[EMAIL PROTECTED] wrote: Hello NG, I am trying to port a useful class from wxWidgets (C++) to a pure Python/wxPython implementation. In the C++ source code, a unique class is initialized with 2 different methods (???). This is what it seems to me. I have this declarations: class wxFoldWindowI

Re: simultaneous copy to multiple media

2005-03-20 Thread Diez B. Roggisch
> > Nope. Or yes. Here comes into play why Heiko said think of what USB stands > for. While the devices appear to be responsive concurrently (the bus > arbitration and multiplexing/demultiplexing is tranparent to the user), it > still is a serial bus, so at a given point in time you can only writ

Re: Building Time Based Bins

2005-03-20 Thread alessandro -oggei- ogier
MCD wrote: > This goes on throughout a 12hr. period. I'd like to be able to place > the low and high values of the additional fields in a single line > divided into 5min intervals. So it would look something like this >> > > 1235 22 88 > 1240 31 94 what about a sane list comprehension madness ?

Re: Software for Poets (Was: Re: Text-to-speech)

2005-03-20 Thread Paul Rubin
Francis Girard <[EMAIL PROTECTED]> writes: > 4- Propose a synonym that will fit in a verse, i.e. with the right amount of > syllabs > > 5- Suggest a missing word or expression in a verse by applying the Shannon > text generation principle > ... > First, do you think it may be a useful tool ? > W

Re: Python scope is too complicated

2005-03-20 Thread Ivan Van Laningham
Hi All-- Dan Bishop wrote: > > > """In Python, there are only two scopes. The global and the local. > > The global scope is a dictionary while the local, in the case of a > > function is extremely fast. There are no other scopes. > > This isn't true anymore, now that generator comprehensions h

Lowest hassle Python web server?

2005-03-20 Thread kanzen
I keep telling my friends that Python rocks. Now it's time to put my money where my mouth is. I'm about to start writing a server for a phone based game. It needs to handle simlpe requests from some Java code running on the phone at a fairly low transaction rate. There will also be a simple web sit

Re: getting text from WinXP console

2005-03-20 Thread Chris Rebert (cybercobra)
You want the function raw_input(). Have you read the tutorial? I should have been covered there. -- http://mail.python.org/mailman/listinfo/python-list

Re: Software for Poets (Was: Re: Text-to-speech)

2005-03-20 Thread Charles Hartman
On Mar 20, 2005, at 4:10 PM, Francis Girard wrote: Hello M. Hartman, It's a very big opportunity for me to find someone that both is a poet and knows something about programming. First, please excuse my bad english ; I'm a french canadian. My French is a great deal worse than your English; fear n

Re: RotatingFileHandler and logging config file

2005-03-20 Thread Vinay Sajip
Rob Cranfill wrote: NID (No, It Doesn't) ;-) but thanks anyway. To reiterate, the question is how to make RotatingFileHandler do a doRotate() on startup from a *config file*. No mention of that in what you point to. I don't think that RotatingFileHandler *should* be configurable to do a doRoll

(",) Do You Want To Know For Sure You Are Going To Heaven?

2005-03-20 Thread Ron038548
http://www.want-to-be-sure.blogspot.com << Click On Link -- http://mail.python.org/mailman/listinfo/python-list

Re: Python scope is too complicated

2005-03-20 Thread Dan Bishop
jfj wrote: > Max wrote: > > Yeah, I know. It's the price we pay for forsaking variable declarations. > > But for java programmers like me, Py's scoping is too complicated. > > Please explain what constitutes a block/namespace, and how to refer to > > variables outside of it. > > > Some may disagree

Re: simultaneous copy to multiple media

2005-03-20 Thread Diez B. Roggisch
> 2) if I understand it right, an USB controller is connected to > to the PCI bus and there can be many separate USB > controller on one PC True. > 3) the theoreticall speed of USB (430 MByte/s?) is much > higher as the experienced 15 MByte/s, probably due to slow > controller on the side of the

Re: Text-to-speech

2005-03-20 Thread Charles Hartman
-- or ". . . a guru named Guido / (Who monitors everything we do) /" and ending with something about "looking max in a Speedo," but fortunately it's not coming to me at the moment. The closest I have an answer to your questions about Python and poetry (aside from the Scandroid) is a book cal

Re: For loop extended syntax

2005-03-20 Thread Heiko Wundram
Am Sonntag, 20. März 2005 22:22 schrieb George Sakkis: > Once more, the 2D/3D example was just that, an example; my point was not to > find a specific solution to a specific problem. And my point being: it's simple enough to give a general recipe (which my example was) without extending Python's

Limerick (was: Re: Text-to-speech)

2005-03-20 Thread Jeremy Bowers
On Sun, 20 Mar 2005 16:18:14 -0500, Steve Holden wrote: > Since it's PyCon week, I will offer a prize of $100 to the best (in my > opinion) limerick about Python posted to this list (with a Cc: to > [EMAIL PROTECTED]) before midday on Friday. The prize money will be my > own, so there are no oth

Re: Text-to-speech

2005-03-20 Thread jamesthiele . usenet
On some flavors of Windows you can use: import pyTTS tts = pyTTS.Create() tts.Speak('This is the sound of my voice.') On Mac OS X you can use: import os os.system("say 'This is the sound of my voice.'") You could write a wrapper that takes a string and checks to see which OS you are on and exec

Re: For loop extended syntax

2005-03-20 Thread George Sakkis
"Heiko Wundram" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > On Sunday 20 March 2005 20:47, George Sakkis wrote: > > Not always. Say for example that you're doing some 2D geometry stuff, and > > later you have to extend it to 3D. In this case you may have to deal with > > both 2D

Re: Text-to-speech

2005-03-20 Thread Steve Holden
Tim Churches wrote: Charles Hartman wrote: Does anyone know of a cross-platform (OSX and Windows at least) library for text-to-speech? I know there's an OSX API, and probably also for Windows. I know PyTTS exists, but it seems to talk only to the Windows engine. I'd like to write a single Python m

Re: simultaneous copy to multiple media

2005-03-20 Thread Claudio Grondi
I don't know any deep details about USB, except that I _know_ that it is a serial bus, but considering following: 1) I can read/write 45 MByte/s from harddrive to harddrive on the E-IDE bus (theoretically 100 MByte/s), so the speed of the harddrive I read/write from/to is probably the bottleneck.

Software for Poets (Was: Re: Text-to-speech)

2005-03-20 Thread Francis Girard
Hello M. Hartman, It's a very big opportunity for me to find someone that both is a poet and knows something about programming. First, please excuse my bad english ; I'm a french canadian. I am dreaming to write a software to help french poets to write strict rigourous classical poetry. Since

Re: simultaneous copy to multiple media

2005-03-20 Thread Rolf Zwart
Swaroop C H wrote: [...] If you are using *nix, maybe you can use the `tee` command[1] and redirect the file to different places. For example, cat | tee file1 | tee file2 > file3 On Unixes I know, only 1 process is needed: /dev/null It does work! ** Rolf I haven't tried it out but it should work.

Re: Pre-PEP: Dictionary accumulator methods

2005-03-20 Thread Aahz
In article <[EMAIL PROTECTED]>, Michele Simionato <[EMAIL PROTECTED]> wrote: > >I am surprised nobody suggested we put those two methods into a >separate module (say dictutils or even UserDict) as functions: > >from dictutils import tally, listappend > >tally(mydict, key) >listappend(mydict, key, v

Re: Changing the Keyboard output

2005-03-20 Thread Jeremy Bowers
On Sun, 20 Mar 2005 19:30:05 +, Abdul Hafiz al-Muslim wrote: > Hi, > I am new to Python and still learning. > > I am looking for a way to change the keyboard output within Tkinter - for > example, say I press "p" and I want to come out as "t". > > Could anyone point me in the right direction

Re: how can I put a 1Gb file in a zipfile??

2005-03-20 Thread Jeff Epler
The limits of ZIP files according to the folks who make info-zip: http://www.info-zip.org/pub/infozip/FAQ.html#limits statistic limit number of files65,536 uncompressed size of a single file 4 GB compressed size of a single file 4

Re: Building Time Based Bins

2005-03-20 Thread MCD
Never mind about the summing... I learned that you can do this: sumhi = 0 sumhi += hi Cool! Thanks again. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to pass parameter when importing a module?

2005-03-20 Thread Bo Peng
Take a look at wxPython versioning: http://wiki.wxpython.org/index.cgi/MultiVersionInstalls The most simple usage looks like import wxversion wxversion.select("2.4") import wx Serge. This is essentially my second method: using another module to set parameter for myModule. Si

Re: simultaneous copy to multiple media

2005-03-20 Thread Heiko Wundram
On Sunday 20 March 2005 17:16, Claudio Grondi wrote: > Is there maybe a way to use a direct DMA > transfer to multiple target destinations > (I copy to drives connected via USB ports) ? Think about what USB stands for. Then reconsider whether you'll ever have the chance of writing truly simultane

Re: For loop extended syntax

2005-03-20 Thread Heiko Wundram
On Sunday 20 March 2005 20:47, George Sakkis wrote: > Not always. Say for example that you're doing some 2D geometry stuff, and > later you have to extend it to 3D. In this case you may have to deal with > both 2D and 3D objects, and map the former to the latter when necessary. But this rather sou

Re: Pre-PEP: Dictionary accumulator methods

2005-03-20 Thread Mike Rovner
Reinhold Birkenfeld wrote: I don't quite understand that. Which dict item are you extending? Don't you need something like dl[key].append("word") Rigth. It was just a typo on my part. Thanks for fixing. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: For loop extended syntax

2005-03-20 Thread George Sakkis
"Matteo Dell'Amico" <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > > I'm sure there must have been a past thread about this topic but I don't > > know how to find it: How > > about extending the "for in" syntax so that X can include default > > arguments ? This would be very > > useful for

Re: wxPython vs. pyQt

2005-03-20 Thread Andrew E
John J. Lee wrote: The key question from my point of view is: can I write commercial sell-if-I-want-to applications using Qt? If it is GPL, then I guess the answer is 'no'? Yes, you can write commercial apps. It's multi-licensed (commercial, GPL, etc.): you get to pick the license(s) you want to

Re: How to pass parameter when importing a module?

2005-03-20 Thread Serge Orlov
Bo Peng wrote: > Dear list, > > What I would like to do is something like: > > In myModule.py ( a wrapper module for different versions of the > module), > if lib == 'standard': > from myModule_std import * > elsif lib == 'optimized' > from myModule_op import * > > but I do not know how

Re: Pre-PEP: Dictionary accumulator methods

2005-03-20 Thread Francis Girard
Hi, I really do not like it. So -1 for me. Your two methods are very specialized whereas the dict type is very generic. Usually, when I see something like this in code, I can smell it's a patch to overcome some shortcomings on a previous design, thereby making the economy of re-designing. Simpl

getting text from WinXP console

2005-03-20 Thread Chris Maloof
Hello, Does anyone know how I can read the ASCII text from a console window (from another application) in WinXP? It doesn't sound like a major operation, but although I can find the window via pywin32, I haven't been able to do anything with it. I'd really just like to get the window text into a

Re: how can I put a 1Gb file in a zipfile??

2005-03-20 Thread bennie
Christos TZOTZIOY Georgiou wrote: On Sun, 20 Mar 2005 10:44:06 +0100, rumours say that Bennie <[EMAIL PROTECTED]> might have written: Hi, I have a problem with ZipFile. It works okay untily I come across a file that is greater then 1Gb. Then it exit with the error: OverflowError: long int

Re: For loop extended syntax

2005-03-20 Thread George Sakkis
"Kay Schluehr" <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > > > This would be very > > useful for list/generator comprehensions, for example being able to > write something like: > > > > [x*y-z for (x,y,z=0) in (1,2,3), (4,5), (6,7,8)] > > > > Looks very appealing, but what to do with > > [

Changing the Keyboard output

2005-03-20 Thread Abdul Hafiz al-Muslim
Hi, I am new to Python and still learning. I am looking for a way to change the keyboard output within Tkinter - for example, say I press "p" and I want to come out as "t". Could anyone point me in the right direction? AHaM -- http://mail.python.org/mailman/listinfo/python-list

Re: simultaneous copy to multiple media

2005-03-20 Thread Claudio Grondi
means your message, that you think, that the consecutive copy is the fastest possible method if using Windows 2000? Claudio "Grant Edwards" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > On 2005-03-20, Claudio Grondi <[EMAIL PROTECTED]> wrote: > > > Is there maybe a way to u

Re: For loop extended syntax

2005-03-20 Thread Matteo Dell'Amico
George Sakkis wrote: I'm sure there must have been a past thread about this topic but I don't know how to find it: How about extending the "for in" syntax so that X can include default arguments ? This would be very useful for list/generator comprehensions, for example being able to write somet

Re: Pre-PEP: Dictionary accumulator methods

2005-03-20 Thread Alexander Schmolck
Beni Cherniavsky <[EMAIL PROTECTED]> writes: >> The relatively recent "improvement" of the dict constructor signature >> (``dict(foo=bar,...)``) obviously makes it impossible to just extend the >> constructor to ``dict(default=...)`` (or anything else for that matter) which >> would seem much less

Re: Pre-PEP: Dictionary accumulator methods - typing & initialising

2005-03-20 Thread Matteo Dell'Amico
Kay Schluehr wrote: I think that's because you have to instantiate a different object for each different key. Otherwise, you would instantiate just one list as a default value for *all* default values. Or the default value will be copied, which is not very hard either or type(self._default)() will

Re: Building Time Based Bins

2005-03-20 Thread MCD
John Machin wrote: > Are you (extremely) new to computer programming? Is this school > homework? Lol, yes, I am relatively new to programming... and very new to python. I have experience working with loops, if thens, and boolean operations, but I haven't worked with lists or array's as of yet... s

Re: Pre-PEP: Dictionary accumulator methods

2005-03-20 Thread Jeremy Bowers
On Sat, 19 Mar 2005 20:07:40 -0800, Kay Schluehr wrote: > It is bad OO design, George. I want to be a bit more become more > specific on this and provide an example: Having thought about this for a bit, I agree it is a powerful counter-argument and in many other languages I'd consider this a total

Re: For loop extended syntax

2005-03-20 Thread Kay Schluehr
George Sakkis wrote: > This would be very > useful for list/generator comprehensions, for example being able to write something like: > > [x*y-z for (x,y,z=0) in (1,2,3), (4,5), (6,7,8)] > Looks very appealing, but what to do with [x*y-z for (x=0,y,z) in (1,2,3), (4,5), (6,7,8)] ? Should it rai

Re: Pre-PEP: Dictionary accumulator methods

2005-03-20 Thread Roose
> Another option with no storage overhead which goes part way to reducing > the awkwardness would be to provide a decorator class accessible through > dict. The decorator class would take a value or function to be used as > the default, but apart from __getitem__ would simply forward all other > me

Re: Pre-PEP: Dictionary accumulator methods

2005-03-20 Thread Colin J. Williams
Paul Rubin wrote: "El Pitonero" <[EMAIL PROTECTED]> writes: What about no name at all for the scalar case: a['hello'] += 1 a['bye'] -= 2 I like this despite the minor surprise that it works even when a['hello'] is uninitialized. +1 and if the value is a list: a['hello']= [1, 2, 3] a['hello']+= [4]

For loop extended syntax

2005-03-20 Thread George Sakkis
I'm sure there must have been a past thread about this topic but I don't know how to find it: How about extending the "for in" syntax so that X can include default arguments ? This would be very useful for list/generator comprehensions, for example being able to write something like: [x*y-z fo

Re: Pre-PEP: Dictionary accumulator methods - typing & initialising

2005-03-20 Thread Kay Schluehr
Matteo Dell'Amico wrote: > Kay Schluehr wrote: > > > Why do You set > > > > d.defaultValue(0) > > d.defaultValue(function=list) > > > > but not > > > > d.defaultValue(0) > > d.defaultValue([]) > > > > ? > > I think that's because you have to instantiate a different object for > each different key.

Re: beeping portably

2005-03-20 Thread John J. Lee
"Jim" <[EMAIL PROTECTED]> writes: > I'd like to emit beeps. The twists are that (1) I hope to have control > over the frequency of the beeps and their duration and (2) I'd like the > solution to be portable across Linux, Windows, and OS X. [...] PyGame? If it's too big for you, you could always

Re: wxPython vs. pyQt

2005-03-20 Thread John J. Lee
Andrew E <[EMAIL PROTECTED]> writes: > Hans-Peter Jansen wrote: > > .. > > While in PyQt world, I found these advantages: > > + conceptually vastly superior > > + powerful api/widgets/features > > + fast as hell due to the efficient binding of a quite efficient lib > > + cool tools, that are u

Re: How to pass parameter when importing a module?

2005-03-20 Thread André Roberge
Bo Peng wrote: Dear list, What I would like to do is something like: In myModule.py ( a wrapper module for different versions of the module), if lib == 'standard': from myModule_std import * elsif lib == 'optimized' from myModule_op import * but I do not know how to pass variable lib to

beeping portably

2005-03-20 Thread Jim
Hello, I'd like to emit beeps. The twists are that (1) I hope to have control over the frequency of the beeps and their duration and (2) I'd like the solution to be portable across Linux, Windows, and OS X. I've done some searching of this group and the solutions that people have offered in the

Re: simultaneous copy to multiple media

2005-03-20 Thread Grant Edwards
On 2005-03-20, Claudio Grondi <[EMAIL PROTECTED]> wrote: > Is there maybe a way to use a direct DMA > transfer to multiple target destinations > (I copy to drives connected via USB ports) ? Sure, but you'll have to throw away your OS, and write a program that runs on the bare metal. > Can someon

Re: ANN: 2005 International Obfuscated Ruby Code Contest (IORCC)

2005-03-20 Thread Gerrit Holl
[EMAIL PROTECTED] wrote: > IMMEDIATE RELEASE: Fri Mar 18 16:34:52 CST 2005 > LOCATION: http://iorcc.dyndns.org/2005/press/031805.html > ANNOUNCEMENT: International Obfuscated Ruby Code Contest (IORCC) >Entry Deadline, Midnight on March 31st, 2005 > > > Dear Rubyi

Re: How to pass parameter when importing a module?

2005-03-20 Thread Swaroop C H
On Sun, 20 Mar 2005 10:18:14 -0600, Bo Peng <[EMAIL PROTECTED]> wrote: > What I would like to do is something like: > In myModule.py ( a wrapper module for different versions of the module), >if lib == 'standard': > from myModule_std import * >elsif lib == 'optimized' > from myMod

Re: [OT] Re: Hi Guys. First Time Poster

2005-03-20 Thread Gerrit Holl
Jeff Schwab wrote: > sheldon279 wrote: > Wow, you sold me. > > Does this kinda scam really still work? This kind of replies works to confuse spambayes. Gerrit. -- Weather in Twenthe, Netherlands 20/03 16:55: 9.0ÂC wind 4.0 m/s ENE (57 m above NAP) -- In the councils of government,

  1   2   >