Re: Python becoming less Lisp-like

2005-03-21 Thread Antoon Pardon
Op 2005-03-18, Jeff Shannon schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> Op 2005-03-16, Jeff Shannon schreef <[EMAIL PROTECTED]>: >> >>>Bruno Desthuilliers wrote: >>> - if x is a class attribute of class A and a is an instance of A, a.x=anyvalue create a new instance attribute x

Re: Text-to-speech

2005-03-21 Thread Paul McGuire
How about a clerihew instead of a limerick? Guido van Rossum Had an idea most awesome. When he lost track of his braces, Just replaced them with spaces. -- Paul McGuire -- http://mail.python.org/mailman/listinfo/python-list

Re: Text-to-speech

2005-03-21 Thread Miki Tebeka
Hello Charles, > 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 module to handle

missing? dictionary methods

2005-03-21 Thread Antoon Pardon
Well at least I find them missing. For the moment I frequently come across the following cases. 1) Two files, each with key-value pairs for the same dictionary. However it is an error if the second file contains a key that was not in the first file. In treating the second file I miss a 'set' met

Re: simultaneous copy to multiple media

2005-03-21 Thread Claudio Grondi
> Try this: > http://mastermind.com.pl/multicopy/ > > This is small tool I've wrote, that does use large memory buffers with > asynchronous I/O to copy file. Thank you! This (with a drawback of blocking the entire system) does it! ( dzieñ dobry i dziêkujê za t± konstruktywn± odpowied¼ na moje py

Re: Python becoming less Lisp-like

2005-03-21 Thread Antoon Pardon
Op 2005-03-18, Bengt Richter schreef <[EMAIL PROTECTED]>: > [ ... ] > > BTW, I would like a re-assign or find-and-rebind operation spelled ":=" which > would > make x := 123 mean look for x as if to read its value in a right hand side > expression, > (except do not look into __builtins__) and wh

Re: missing? dictionary methods

2005-03-21 Thread George Sakkis
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Well at least I find them missing. > > For the moment I frequently come across the following cases. > > 1) Two files, each with key-value pairs for the same dictionary. > However it is an error if the second file contains

Please help for Python programming

2005-03-21 Thread yy0127
I don't know why i entered the below code and it will miss some records. Anyone can help me??? users = {} users1 = {} while 1: user, serviceType, msgType, inOut, date, time, numBytes = aLog.GetNextMessage("") fullmsg = serviceType + "|" + msgType + "|" + inOut bytemsg = u

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

2005-03-21 Thread Bengt Richter
On Sun, 20 Mar 2005 14:17:20 -0600, Jeff Epler <[EMAIL PROTECTED]> wrote: > >--liOOAslEiF7prFVr >Content-Type: text/plain; charset=us-ascii >Content-Disposition: inline >Content-Transfer-Encoding: quoted-printable > >The limits of ZIP files according to the folks who make info-zip: >http://www.inf

Re: generating audio signals

2005-03-21 Thread Bengt Richter
On Sun, 20 Mar 2005 12:25:22 +0200, nicke <[EMAIL PROTECTED]> wrote: >I'm running linux and would like to generate specific frequencies and >play them(in OSS) or alternatively save them as wav files, how should I >accomplish this? Using python to play and generate is not strictly >necessary, as lo

Re: HTML editor component?

2005-03-21 Thread Fuzzyman
skol wrote: > Is there any HTML WYSIWYG editor component available for > Python/wxPython? Thanks. I can reccomend Kupu as a javascript one. http://kupu.oscom.org A WYSIWYG HTML editor is a full blown application - so I'd be surprised (pleasantly) to see one available as a component. Regards, F

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

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

Re: IconvCodec, UTF-32 & P4 ?

2005-03-21 Thread Serge Orlov
Do Re Mi chel La Si Do wrote: > 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. Do you mean it's impossible to build iconvcodec anymore? Serge. -- http://mail.python.org/mailman/listinfo/p

Re: Please help for Python programming

2005-03-21 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I don't know why i entered the below code and it will miss some > records. > Anyone can help me??? Sorry, my mindreading brain extension is at the service right now, so I can't guess what that piece of syntactically incorrect code is supposed to do and what error messag

Re: beeping portably

2005-03-21 Thread Bengt Richter
On 20 Mar 2005 09:03:25 -0800, "Jim" <[EMAIL PROTECTED]> wrote: >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 se

Re: beeping portably

2005-03-21 Thread Diez B. Roggisch
Jim wrote: > 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 p

Re: Pre-PEP: Dictionary accumulator methods

2005-03-21 Thread haraldarminmassa
Raymond, I am +1 for both suggestions, tally and appendlist. Extended: > Also, in all of my code base, I've not run across a single opportunity to use > something like unionset(). This is surprising because I'm the set() author > and > frequently use set based algorithms.Your example was

Re: IconvCodec, UTF-32 & P4 ?

2005-03-21 Thread Do Re Mi chel La Si Do
re-Hi When I look http://cjkpython.i18n.org I found only binaries for P2.1, P2.2 & P2.3 (I am on windows) If I run the P2.3's version, on my Python 2.4 config, the package said that he don't found Python2.3. And, I don't have compiler for work with source. If benefactor of humanity has do

Re: missing? dictionary methods

2005-03-21 Thread Robert Kern
Antoon Pardon wrote: Well at least I find them missing. For the moment I frequently come across the following cases. 1) Two files, each with key-value pairs for the same dictionary. However it is an error if the second file contains a key that was not in the first file. In treating the second file

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

2005-03-21 Thread Do Re Mi chel La Si Do
Hi ! Finally, it's the best solution. Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Python scope is too complicated

2005-03-21 Thread jfj
Dan Bishop wrote: x = 17 sum(x for x in xrange(101)) 5050 x 17 Your example with generator expressions is interesting. Even more interesting is: def foo(x): y= (i for i in x) return y From the disassembly it seems that the generator is a code object but 'x' is not a cell variable. WTF?

UTF Questions

2005-03-21 Thread Fuzzyman
I have a couple of questions about the UTF encodings. The codecs module has constants definded for the UTF32 encoding, yet this encoding isn't supported as a standard encoding. Why isn't it supported ? It possibly has something to do with my next question. I know that unicode has (recently?) been

Re: Question about string.printable and non-printable characters

2005-03-21 Thread Sibylle Koczian
Michael Hoffman schrieb: string.printable is a least-common denominator ASCII set. You can certainly make it string.printable + "aeioun" (replacing the ASCII letters with their accented versions in your codeset of course). There is something I don't understand about string.printable: on the one ha

Re: missing? dictionary methods

2005-03-21 Thread Antoon Pardon
Op 2005-03-21, Robert Kern schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> Well at least I find them missing. >> >> For the moment I frequently come across the following cases. >> >> 1) Two files, each with key-value pairs for the same dictionary. >> However it is an error if the second fi

Re: Text-to-speech

2005-03-21 Thread Charles Hartman
Maybe you can bind Festival (http://www.cstr.ed.ac.uk/projects/festival/download.html) with SWIG. Presumably somebody could; at this point it's well beyond me. But thank you for the suggestion. Charles Hartman http://cherry.conncoll.edu/cohar -- http://mail.python.org/mailman/listinfo/python-lis

Re: Text-to-speech

2005-03-21 Thread Martin Franklin
Charles Hartman wrote: Maybe you can bind Festival (http://www.cstr.ed.ac.uk/projects/festival/download.html) with SWIG. Presumably somebody could; at this point it's well beyond me. But thank you for the suggestion. Charles Hartman http://cherry.conncoll.edu/cohar There is tkfestival http://lu

Constructor class problem

2005-03-21 Thread Wolfgang
Hi, I am a newbie and have to modify some python moduls. I get the followin error: TypeError: __init__() takes exactly 3 arguments (2 given) Here the code snippet: class gXconv: def __init__(self, pathValue): self.pathValue=pathValue self.__sections = {} self.__spalten

Re: Lowest hassle Python web server?

2005-03-21 Thread Neil Benn
- Does threading cause any more of a hassle in Python than Java? Hello, From the python docs, it states that the threading design is loosely based upon the java module. Certainly, coming from Java I had little trouble getting used to python threading. However heres some gotchyas : - Th

xmlrpc with Python and large datases

2005-03-21 Thread writeson
Hi all, I helped one of my co-workers put together an XMLRPC Python script that allowed him to get database data from remote machines. This was done because the source of the data could be Oracle on a Sun/Solaris machine, and MySQL on our linux machines. Doing the script in Python allowed him to g

Re: getting text from WinXP console

2005-03-21 Thread Jeff Schwab
Lucas Raab wrote: Chris Maloof wrote: 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 ju

Re: Constructor class problem

2005-03-21 Thread Diez B. Roggisch
Wolfgang wrote: > Hi, > I am a newbie and have to modify some python moduls. > I get the followin error: > TypeError: __init__() takes exactly 3 arguments (2 given) > > Here the code snippet: > class gXconv: > def __init__(self, pathValue): > self.pathValue=pathValue > self.__

Re: xmlrpc with Python and large datases

2005-03-21 Thread Duncan Booth
writeson wrote: > Since then he's run into a problem. If he sends a query that gets a > very large recordset from the database the script fails and it vaguely > reports about a "broken pipe", which I'm guessing is a problem with the > network connection. Has anyone else seen this use XMLRPC and Py

Re: getting text from WinXP console

2005-03-21 Thread Lucas Raab
Chris Maloof wrote: 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

Re: missing? dictionary methods

2005-03-21 Thread Robert Kern
Antoon Pardon wrote: I would say the same reason that we have get. There is no reason to have a builtin get it is easily implemented like this: def get(dct, key, default): try: return dct[key] except KeyError: return default I would go even so far that there is more reason to

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

2005-03-21 Thread david . tolpin
> Needs??? Sorry to be blunt, but this is an intrinsically ludicrous > concept, in *any* language. The whole idea of modules is (wait for it) > "modularity". "A imports B which imports A" is an utter nonsense. > There is such a thing called 'recursion'. Self-recursion is when function x calls its

Problem installing Python in Win98se

2005-03-21 Thread Prescott, A.
Hi, I want to install Python on my Windows 98se system, but although I followed the instructions carefully, it won't run. Here's a copy of the Web instructions I followed, from Python.org: "Starting with the Python 2.4 releases the Windows Python installer is being distributed as a Microso

webGobbler update

2005-03-21 Thread [EMAIL PROTECTED]
The beta 10 of webGobbler is available for download. http://sebsauvage.net/python/webgobbler/ Amongst the changes, the Windows screensaver now works, although it still misses a configuration GUI. I also created a non-technical page for webGobbler, the gallery: http://sebsauvage.net/webgobbler/

Re: missing? dictionary methods

2005-03-21 Thread Antoon Pardon
Op 2005-03-21, Robert Kern schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> I would say the same reason that we have get. There is no >> reason to have a builtin get it is easily implemented >> like this: >> >> def get(dct, key, default): >> >> try: >> return dct[key] >> e

Re: For loop extended syntax

2005-03-21 Thread Ron
On Sun, 20 Mar 2005 13:16:37 -0500, "George Sakkis" <[EMAIL PROTECTED]> 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/

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

2005-03-21 Thread RM
>From what I understand, Winzip uses their own proprietary version of a Zip format. That means that you will only be able open those archives with Winzip. (IOW, you are locked in) I think someone mentioned having developed a Python module for the 7zip fomat, but I may be wrong. In any case, you

Re: PyPI errors?

2005-03-21 Thread A.M. Kuchling
On Mon, 21 Mar 2005 04:24:16 + (UTC), Daniel Yoo <[EMAIL PROTECTED]> wrote: > Does anyone know why PyPI's doesn't like my PKG-INFO file? Here's > what I have: The PyPI code is being modified at the PyCon sprints; clearly this is a bug that was introduced yesterday. I expect it'll g

Re: IconvCodec, UTF-32 & P4 ?

2005-03-21 Thread Serge Orlov
Do Re Mi chel La Si Do wrote: > re-Hi > > > When I look http://cjkpython.i18n.org I found only binaries for > P2.1, P2.2 & P2.3 (I am on windows) > > If I run the P2.3's version, on my Python 2.4 config, the package > said that he don't found Python2.3. > > And, I don't have compiler for work wi

Re: Getting directory size

2005-03-21 Thread Peter Hansen
francisl wrote: How can we get a full directory size (sum of all his data)? like when we type `du -sh mydir` Because os.path.getsize('mydir') only give the size of the directory physical representation on the disk. os.popen('du -sh mydir') would be one approach. The harder way is to use os.walk('m

Re: missing? dictionary methods

2005-03-21 Thread Ron
On 21 Mar 2005 08:21:40 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: >Well at least I find them missing. > >For the moment I frequently come across the following cases. > >1) Two files, each with key-value pairs for the same dictionary. >However it is an error if the second file contains a key th

Re: Pre-PEP: Dictionary accumulator methods

2005-03-21 Thread AndrewN
Raymond Hettinger wrote: > I would like to get everyone's thoughts on two new dictionary methods: > > def count(self, value, qty=1): > try: > self[key] += qty > except KeyError: > self[key] = qty > > def appendlist(self, key, *

Re: UTF Questions

2005-03-21 Thread Serge Orlov
Fuzzyman wrote: > I have a couple of questions about the UTF encodings. > > The codecs module has constants definded for the UTF32 encoding, yet > this encoding isn't supported as a standard encoding. Why isn't it > supported ? Probably because there is little demand for it. The most widespread un

Re: IconvCodec, UTF-32 & P4 ?

2005-03-21 Thread News M Claveau /Hamster-P
Hi ! Thanks My e-mail : [EMAIL PROTECTED] @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Save passwords in scripts

2005-03-21 Thread Florian Lindner
Hello, I've a scripts that allows limited manipulation of a database to users. This script of course needs to save a password for the database connection. The users, on the other hand need read permission on the script in order to execute it but should not be able to read out the password. What is

Re: Pre-PEP: Dictionary accumulator methods

2005-03-21 Thread Michele Simionato
FWIW, here is my take on the defaultdict approach: def defaultdict(defaultfactory, dictclass=dict): class defdict(dictclass): def __getitem__(self, key): try: return super(defdict, self).__getitem__(key) except KeyError: return se

Re: spaces in re.compile()

2005-03-21 Thread AndrewN
>>> d = re.compile(' \d{3}\.\d{3}\.\d{3} ') >>> d.findall(' 123.345.678 ') [' 123.345.678 '] Works for me. -- http://mail.python.org/mailman/listinfo/python-list

Re: spaces in re.compile()

2005-03-21 Thread rbt
AndrewN wrote: d = re.compile(' \d{3}\.\d{3}\.\d{3} ') d.findall(' 123.345.678 ') [' 123.345.678 '] Works for me. Yes, you're correct. That works if there is a space at the front and back. However, place '123.345.678' in a file by itself and it doesn't work. What I'm trying to avoid is something

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

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

Re: Please help for Python programming

2005-03-21 Thread bruno modulix
[EMAIL PROTECTED] wrote: I don't know why i entered the below code And we don't know either !-) and it will miss some records. Anyone can help me??? If you hope to get some useful help, it would be a good idea to follow Diez's advice (see other post in this thread) users = {} users1 = {} while

Wikipedia - conversion of in SQL database stored data to HTML

2005-03-21 Thread Claudio Grondi
Is there an already available script/tool able to extract records and generate proper HTML code out of the data stored in the Wikipedia SQL data base? e.g. converting all occurences of [[xxx|yyy]] to yyy etc. Or even better a script/tool able to generate and write to the disk all the HTML files

python-dev Summary for 2005-03-01 through 2005-03-15

2005-03-21 Thread Brett C.
[The HTML version of this Summary is available at http://www.python.org/dev/summary/2005-03-01_2005-03-15.html] = Summary Announcements = - Second to last summary for me - Just a reminder, after this Su

Re: spaces in re.compile()

2005-03-21 Thread Jeff Epler
Maybe you want r'\b'. From 'pydoc sre': \b Matches the empty string, but only at the start or end of a word. import re r = re.compile( r'\btest\b' ) print r.findall("testy") print r.findall(" testy ") print r.findall(" test ") print r.findall("test") pgps8PNW4uDgh.pgp Description: PG

spaces in re.compile()

2005-03-21 Thread rbt
Is it possible to use spaces in a re.compile()? For example, I want to make sure one space exists right before this string and right after it: re.compile ('\d{3,3}\.\d{3,3}\.\d{3,3}\.\d{3,3}') I've tried this, but it didn't work: re.compile (' \d{3,3}\.\d{3,3}\.\d{3,3}\.\d{3,3} ') Any ideas? -- h

Re: exec src in {}, {} strangeness

2005-03-21 Thread Stefan Seefeld
Do Re Mi chel La Si Do wrote: Hi ! Try : exec f in globals(),locals() or exec(f,globals(),locals()) or exec f in globals(),globals() or exec(f,globals(),globals()) Indeed, using 'globals()' and 'locals()' works. However, both report the same underlaying object, which is a bit confus

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

2005-03-21 Thread Francis Girard
This is about poetry. I think the next reply should be done privately unless someone else is interested in it. Hi, Le dimanche 20 Mars 2005 23:04, Paul Rubin a écrit : > Francis Girard <[EMAIL PROTECTED]> writes: > > 4- Propose a synonym that will fit in a verse, i.e. with the right amount > > o

Re: exec src in {}, {} strangeness

2005-03-21 Thread Peter Hansen
Stefan Seefeld wrote: Indeed, using 'globals()' and 'locals()' works. However, both report the same underlaying object, which is a bit confusing. (Under what circumstances does 'locals()' return not the same object as 'globals()' ?) When you aren't at the interactive prompt... there are no "locals

Re: simultaneous copy to multiple media

2005-03-21 Thread Jacek Trzmiel
> > This is small tool I've wrote, that does use large memory buffers with > > asynchronous I/O to copy file. Claudio Grondi wrote: > Thank you! > This (with a drawback of blocking the entire system) does it! > ( dzień dobry i dziękuję za tą konstruktywną odpowiedź > na moje pytanie ) :) > From

Re: Save passwords in scripts

2005-03-21 Thread Peter Hansen
Florian Lindner wrote: I've a scripts that allows limited manipulation of a database to users. This script of course needs to save a password for the database connection. The users, on the other hand need read permission on the script in order to execute it but should not be able to read out the pa

pyopengl and py2exe

2005-03-21 Thread Kirill Kuvaldin
Hello All! My program in python uses PyOpenGL and I need to convert it to a standalone windows executable file. Following to these instructions (http://pyopengl.sourceforge.net/documentation/py2exe.html) I've put PyOpenGL package to a directory where my program was placed. and run the script:

Re: Text-to-speech

2005-03-21 Thread Brian van den Broek
Paul McGuire said unto the world upon 2005-03-21 03:10: How about a clerihew instead of a limerick? Guido van Rossum Had an idea most awesome. When he lost track of his braces, Just replaced them with spaces. -- Paul McGuire Hi all, that's pretty good, Paul. However, I must insist that you both cea

Re: Python becoming less Lisp-like

2005-03-21 Thread Jeff Shannon
Antoon Pardon wrote: Op 2005-03-18, Jeff Shannon schreef <[EMAIL PROTECTED]>: I find it odd that you start by saying you still find them very consistent and here state there is a slight inconsistency. I said that the way that binding a name on a class instance always creates an instance attribute

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

2005-03-21 Thread Scott David Daniels
Tim Churches wrote: ... My first attempt (which does not scan properly): A Dutch mathematician most prophetic, Did invent a language, name herpetic. With design quite intelligent, And syntax mostly elegant, Big ideas could be made non-hypothetic. To improve the scan: A mathematician, propheti

Re: exec src in {}, {} strangeness

2005-03-21 Thread Stefan Seefeld
Peter Hansen wrote: Stefan Seefeld wrote: Indeed, using 'globals()' and 'locals()' works. However, both report the same underlaying object, which is a bit confusing. (Under what circumstances does 'locals()' return not the same object as 'globals()' ?) When you aren't at the interactive prompt...

Re: Save passwords in scripts

2005-03-21 Thread Florian Lindner
Peter Hansen wrote: > Florian Lindner wrote: >> I've a scripts that allows limited manipulation of a database to users. >> This script of course needs to save a password for the database >> connection. The users, on the other hand need read permission on the >> script in order to execute it but sh

Re: remove strings from source

2005-03-21 Thread qwweeeit
I am in debt with you of an answer on " my" solution in removing literal strings... I apologize not to have followed your suggestions but I am just learning Python, and your approach was too difficult for me! I've already developed the cross reference tool, and for that I identified two types of li

Re: getting text from WinXP console

2005-03-21 Thread Lucas Raab
Jeff Schwab wrote: Lucas Raab wrote: Chris Maloof wrote: 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

Re: Getting directory size

2005-03-21 Thread Graham Fawcett
Peter Hansen wrote: > francisl wrote: > > How can we get a full directory size (sum of all his data)? > > like when we type `du -sh mydir` > > > > Because os.path.getsize('mydir') only give the size of the directory > > physical representation on the disk. > > os.popen('du -sh mydir') would be one

Re: exec src in {}, {} strangeness

2005-03-21 Thread Bernhard Herzog
Stefan Seefeld <[EMAIL PROTECTED]> writes: > Is there anything wrong with 'exec source in a, b' where > a and b are distinc originally empty dictionaries ? Again, > my test code was > > class Foo: pass > class Bar: >foo = Foo > > and it appears as if 'Foo' was added to 'a', but when evaluating

Re: exec src in {}, {} strangeness

2005-03-21 Thread Stefan Seefeld
Bernhard Herzog wrote: Stefan Seefeld <[EMAIL PROTECTED]> writes: Is there anything wrong with 'exec source in a, b' where a and b are distinc originally empty dictionaries ? Again, my test code was class Foo: pass class Bar: foo = Foo and it appears as if 'Foo' was added to 'a', but when evalua

Re: Wikipedia - conversion of in SQL database stored data to HTML

2005-03-21 Thread Leif K-Brooks
Claudio Grondi wrote: Is there an already available script/tool able to extract records and generate proper HTML code out of the data stored in the Wikipedia SQL data base? They're not in Python, but there are a couple of tools available here: . By the way: has someone suc

Re: [ann] fdups 0.15

2005-03-21 Thread P
Patrick Useldinger wrote: I am happy to announce version 0.15 of fdups. Cool. For reference have a look at: http://www.pixelbeat.org/fslint/ Pádraig. -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting directory size

2005-03-21 Thread P
francisl wrote: How can we get a full directory size (sum of all his data)? like when we type `du -sh mydir` Because os.path.getsize('mydir') only give the size of the directory physical representation on the disk. Have a look at: http://www.pixelbeat.org/scripts/dutop Pádraig. -- http://mail.pyth

Re: Save passwords in scripts

2005-03-21 Thread Esben Pedersen
Florian Lindner wrote: Hello, I've a scripts that allows limited manipulation of a database to users. This script of course needs to save a password for the database connection. The users, on the other hand need read permission on the script in order to execute it but should not be able to read out

Re: getting text from WinXP console

2005-03-21 Thread Cappy2112
If you re-direct the output to a file, then you won't see it on the console at all, unless the program writes to stderr separately. -- http://mail.python.org/mailman/listinfo/python-list

Re: getting text from WinXP console

2005-03-21 Thread Cappy2112
Are you the one who is launching the Nethack program, or is it already running, and you ar e trying to capture the text after Nethack is launched ? If you are launching it you can try using one of the python popen() calls to redirect the screen output to your python program. I havne't doen this

Re: spaces in re.compile()

2005-03-21 Thread rbt
Jeff Epler wrote: Maybe you want r'\b'. From 'pydoc sre': \b Matches the empty string, but only at the start or end of a word. import re r = re.compile( r'\btest\b' ) print r.findall("testy") print r.findall(" testy ") print r.findall(" test ") print r.findall("test") That works great. T

Re: generating audio signals

2005-03-21 Thread Cappy2112
>>Maybe make yourself a little utility first that will show you the specs for any .wav file (i.e., >>sampling frequency, bytes per sample, channels, etc.) You can do this with one function call - wave.Wave_read.getparams() import wave wave.open("filename","b") wave.Wave_read.getparams() -- http:

Re: missing? dictionary methods

2005-03-21 Thread Terry Reedy
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > For the moment I frequently come across the following cases. > > 1) Two files, each with key-value pairs for the same dictionary. > However it is an error if the second file contains a key that > was not in the first fi

Re: Please help for Python programming

2005-03-21 Thread Terry Reedy
This is what I see (minus the '> '): > while 1: > user, serviceType, msgType, inOut, date, time, numBytes = > aLog.GetNextMessage("") [etc] Advice: use spaces, not tabs, to indent posted code (some readers discard tabs). Don't use google groups to post code (it deletes initial spaces and won't

Re: Save passwords in scripts

2005-03-21 Thread Paul Rubin
Florian Lindner <[EMAIL PROTECTED]> writes: > I've a scripts that allows limited manipulation of a database to users. This > script of course needs to save a password for the database connection. The > users, on the other hand need read permission on the script in order to > execute it but should n

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

2005-03-21 Thread Paul Rubin
Scott David Daniels <[EMAIL PROTECTED]> writes: >A mathematician, prophetic, >invented a language, herpetic. > decidedly brilliant, > syntacticly elegant, syntactically elegant, with features intelligent >Made ideas far less hypothetic. Made writing new code copasetic. --

Python 2.4 (Windows) Binaries of SciPy

2005-03-21 Thread Srijit Kumar Bhadra
Hello, I have posted a similar message in SciPy mailing list. I hope it is ok to also post it here. I am looking for Python 2.4 Binaries (Windows)of SciPy. Are there any plans to upload Python 2.4 binaries? Best Regards, /Srijit -- http://mail.python.org/mailman/listinfo/python-list

Re: getting text from WinXP console

2005-03-21 Thread Jeff Shannon
Lucas Raab wrote: Chris Maloof wrote: 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

Re: Python scope is too complicated

2005-03-21 Thread Terry Reedy
"jfj" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > def foo(x): > y= (i for i in x) > return y > > From the disassembly it seems that the generator is a code object What is type(foo([1,2,3])) ? > but 'x' is not a cell variable. WTF? As I understand it, the object 'x' b

Re: xmlrpc with Python and large datases

2005-03-21 Thread writeson
Duncan, Thanks for the reply. We are running this on an Apache server on the linux box, and an iPlanet4.1 server on the solaris machines. However, both these servers are strictly 'inside' the firewall. I checked the apache configuration and there is no limitrequestbody parameter in the file at all

Sending hex number as is

2005-03-21 Thread knguyen
This question may be ased before, but I couldn't find the answer searching the archive. Basically, I just want to send a hex number from one machine to the next: for example msg = "Length is " n = '\x81' msg += n sock.send(msg) The problem is n's value is not fixed. For example, msg = "Length

Re: Sending hex number as is

2005-03-21 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > This question may be ased before, but I couldn't find the answer > searching the archive. > > Basically, I just want to send a hex number from one machine to the > next: > > for example > > msg = "Length is " > n = '\x81' > msg += n > sock.send(msg) > > The problem is

PIGIP Meeting tonight -- Python Interest Group In Princeton

2005-03-21 Thread [EMAIL PROTECTED]
PIGIP will hold it's March meeting tonight at 7pm at the Lawrenceville Public Library. Anyone in Central New Jersey, USA interested in the Python Programming Language is invited to attend. We will be reviewing the Python tutorial (Chapters 6,7,and 8), and open discussion about Python use will be e

Re: Text-to-speech

2005-03-21 Thread Paul McGuire
Brian, Having reviewed your Cease and Desist petition, I'm afraid I must dispute some or all of your claims: 1. Your citation of prior art has one or more significant defects: a. In your citation, "brace" is clearly rhymed with "whitespace", not "space". The broad concept of "whitespace" is subs

Re: Sending hex number as is

2005-03-21 Thread Grant Edwards
On 2005-03-21, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > msg = "Length is " > n = '\x81' > msg += n > sock.send(msg) > > The problem is n's value is not fixed. For example, > > msg = "Length is " > n = len(somestring) > msg += n # This won't work of course, since n is int > > How do I send t

Re: For loop extended syntax

2005-03-21 Thread George Sakkis
"Ron" <[EMAIL PROTECTED]> wrote: > How would this examples work? > > for x=5,y,z in (123),(4,5),(6,7,8,9) > > Would the x default over ride the first value? > Should, the 4 element in the third tuple be dropped without an error? It has already been clarified twice in the thread that the default v

Re: Pre-PEP: Dictionary accumulator methods

2005-03-21 Thread George Sakkis
"Michele Simionato" <[EMAIL PROTECTED]> wrote: > FWIW, here is my take on the defaultdict approach: > > def defaultdict(defaultfactory, dictclass=dict): > class defdict(dictclass): > def __getitem__(self, key): > try: > return super(defdict, self).__getitem_

Re: wxPython vs. pyQt

2005-03-21 Thread [EMAIL PROTECTED]
since I'm developing in Tkinter, I'm intrigued by your comment that: "It allowed me to do things in hours, which literally took weeks with tkinter, " please elaborate! Cheers S -- http://mail.python.org/mailman/listinfo/python-list

Re: For loop extended syntax

2005-03-21 Thread Jeff Shannon
George Sakkis wrote: A generalization of the 'for .. in' syntax that would handle > extra arguments the same way as functions would be: for (x,y,z=0,*rest) in (1,2,3), (3,4), (5,6,7,8): print x, y, z, rest I'd love to see this in python one day; it is pretty obvious what > it would do for any

Re: Text-to-speech

2005-03-21 Thread Bill Mill
On 21 Mar 2005 12:47:07 -0800, Paul McGuire <[EMAIL PROTECTED]> wrote: > Brian, > > Having reviewed your Cease and Desist petition, I'm afraid I must > dispute some or all of your claims: > > 1. Your citation of prior art has one or more significant defects: > a. In your citation, "brace" is clea

Re: Sending hex number as is

2005-03-21 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Basically, I just want to send a hex number from one machine to the > next: 'Hex number' is not completely clear. Do you want to send the number in binary form or in text form. Text form is much easier and more dependable, so shou

  1   2   >