Re: pep 8 constants

2009-06-29 Thread Steven D'Aprano
On Mon, 29 Jun 2009 22:37:15 -0400, Eric S. Johansson wrote: > Steven D'Aprano wrote: ... >> Sounds to me that your speech environment needs a command to turn >> capslock on and off, and your problem with PEP 8 is solved: > > you haven't used recognition, have you? No. >> x equals caps on red

Re: csv blank fields

2009-06-29 Thread Mag Gam
Thankyou! On Tue, Jun 30, 2009 at 12:17 AM, Chris Rebert wrote: > On Mon, Jun 29, 2009 at 8:47 PM, Lawrence > D'Oliveiro wrote: >> In message , MRAB >> wrote: >> >>>      row = [r or "NULL" for r in row] >> >> I know that, in this particular case, all the elements of row are strings, >> and the

Re: csv blank fields

2009-06-29 Thread Chris Rebert
On Mon, Jun 29, 2009 at 8:47 PM, Lawrence D'Oliveiro wrote: > In message , MRAB > wrote: > >>      row = [r or "NULL" for r in row] > > I know that, in this particular case, all the elements of row are strings, > and the only string that is equivalent to False is the empty string, but > still > >  

Re: fork, threads and proper closing

2009-06-29 Thread Lawrence D'Oliveiro
In message , Francesco Bochicchio wrote: > ... if the thread is waiting for a blocking I/O operation to complete, > like reading from a socket with no data or waiting for a locked resource > (i.e. semaphore) to be unlocked, it will not service the queue and will > not read the 'quit command' (the

Re: Making code run in both source tree and installation path

2009-06-29 Thread Lawrence D'Oliveiro
In message , Javier Collado wrote: > - distutils trick in setup.py to modify the installed script (i.e. > changing a global variable value) so that it has a reference to the > data files location. This seems to me to be the cleanest solution, at least as a default. > - Heuristic in the package

Re: Looking for developer to help me

2009-06-29 Thread Lawrence D'Oliveiro
In message , Daniel Gerzo wrote: > http://bitbucket.org/danger/pysublib/src/ Can't seem to get through to your site. -- http://mail.python.org/mailman/listinfo/python-list

Re: csv blank fields

2009-06-29 Thread Lawrence D'Oliveiro
In message , MRAB wrote: > row = [r or "NULL" for r in row] I know that, in this particular case, all the elements of row are strings, and the only string that is equivalent to False is the empty string, but still row = [[r, "NULL"][r == ""] for r in row] -- http://mail.python.org

Re: Direct interaction with subprocess - the curse of blocking I/O

2009-06-29 Thread Lawrence D'Oliveiro
In message , Pascal Chambon wrote: > I met the issue : select() works only on windows ... No it doesn't. It works only on sockets on Windows, on Unix/Linux it works with all file descriptors . -- http://mail.python.org/mailman/listinfo/python-list

Re: Drawing in PDF

2009-06-29 Thread Lawrence D'Oliveiro
In message , Jun wrote: > ... is there open source solution ? Poppler? -- http://mail.python.org/mailman/listinfo/python-list

Re: No trees in the stdlib?

2009-06-29 Thread Paul Rubin
João Valverde writes: > Rereading this I got what you meant by "wrapper with mutating slot". > But that is (like I think you implied) functionally equivalent to a > mutating data structure, with worse performance because of additional > memory allocation and such. Is it faster to rebalance the tre

Re: pep 8 constants

2009-06-29 Thread Eric S. Johansson
Steven D'Aprano wrote: > Why do you think a smart editing environment is in opposition to coding > conventions? Surely an editor smart enough to know a variable name spoken > as "pear tree" is an instance and therefore spelled as pear_tree (to use > your own example) would be smart enough to kn

Re: why PyObject_VAR_HEAD?

2009-06-29 Thread Benjamin Peterson
kio gmail.com> writes: > > Hi, > > I'm studying the CPython source code. I don’t quite understand why > they’re using PyObject_VAR_HEAD to define struct like PyListObject. To > define such kind of struct, could I use _PyObject_HEAD_EXTRA as a > header and add "items" pointer and "allocated" cou

Re: Determining if a function is a method of a class within a decorator

2009-06-29 Thread Steven D'Aprano
On Mon, 29 Jun 2009 18:01:29 -0700, David Hirschfield wrote: > I'm having a little problem with some python metaprogramming. I want to > have a decorator which I can use either with functions or methods of > classes, which will allow me to swap one function or method for another. > It works as I w

Creating multiprocessing processes without forking on MacOSX?

2009-06-29 Thread Bob Petersen
All, I am using the multiprocessing backport with Python 2.5.4 on a cross-platform Mac/Windows app. Things were going swimmingly until I tried to load a library on the Mac that calls CoreFoundation system calls. I discovered that certain (many?) OSX system calls fail when called from a forked p

why PyObject_VAR_HEAD?

2009-06-29 Thread kio
Hi, I'm studying the CPython source code. I don’t quite understand why they’re using PyObject_VAR_HEAD to define struct like PyListObject. To define such kind of struct, could I use _PyObject_HEAD_EXTRA as a header and add "items" pointer and "allocated" count explicity? Is there any difference?

Re: generator expression works in shell, NameError in script

2009-06-29 Thread alito
On Jun 18, 11:56 pm, nn wrote: > On Jun 18, 8:38 am, guthrie wrote: > > > > > On Jun 17, 6:38 pm, Steven Samuel Cole > > wrote: > > > > Still don't really understand why my initial code didn't work, though... > > > Your code certainly looks reasonable, and looks to me like it "should" > > work.

Re: problems with mysql db

2009-06-29 Thread Lawrence D'Oliveiro
In message , Gabriel Genellina wrote: > The fact that it's the same character used for formatting strings with the > % operator is an unfortunate coincidence (or a very bad choice, I don't > know). That's not the problem. The problem is that MySQLdb IS indeed using Python format substitution to

Re: Determining if a function is a method of a class within a decorator

2009-06-29 Thread David Hirschfield
Yeah, it definitely seems like having two separate decorators is the solution. But the strange thing is that I found this snippet after some deep googling, that seems to do something *like* what I want, though I don't understand the descriptor stuff nearly well enough to get what's happening:

Re: pep 8 constants

2009-06-29 Thread Eric S. Johansson
Rhodri James wrote: > > Could you elucidate a bit? I'm not seeing how you're intending to keep > PEP-8 conventions in this, and I'm not entirely convinced that without > them the smart editor approach doesn't in fact reduce your productivity. > thank you for asking for an elaboration. Program

Re: Determining if a function is a method of a class within a decorator

2009-06-29 Thread Terry Reedy
David Hirschfield wrote: I'm having a little problem with some python metaprogramming. I want to have a decorator which I can use either with functions or methods of classes, which will allow me to swap one function or method for another. It works as I want it to, except that I want to be able

Determining if a function is a method of a class within a decorator

2009-06-29 Thread David Hirschfield
I'm having a little problem with some python metaprogramming. I want to have a decorator which I can use either with functions or methods of classes, which will allow me to swap one function or method for another. It works as I want it to, except that I want to be able to do some things a littl

Re: pep 8 constants

2009-06-29 Thread Steven D'Aprano
On Mon, 29 Jun 2009 11:49:04 -0400, Eric S. Johansson wrote: > alex23 wrote: >> "Eric S. Johansson" wrote: >>> no, I know the value if convention when editors can't tell you >>> anything about the name in question. I would like to see more support >>> for disabled programmers like myself and the

Re: identify checksum type?

2009-06-29 Thread Christian Heimes
PK schrieb: > Given a checksum value, whats the best way to find out what type it is? > > meaning. I can use hashlib module and compute a md5 or sha1 for a given data > etc..but given a checksum value say "d2bda52ee39249acc55a75a0f3566105" whats > the best way for me to identify if its a sha1 or m

identify checksum type?

2009-06-29 Thread PK
Given a checksum value, whats the best way to find out what type it is? meaning. I can use hashlib module and compute a md5 or sha1 for a given data etc..but given a checksum value say "d2bda52ee39249acc55a75a0f3566105" whats the best way for me to identify if its a sha1 or md5 or anyother sum typ

Re: No trees in the stdlib?

2009-06-29 Thread João Valverde
alex23 wrote: João Valverde wrote: Currently I don't have a strong need for this. And clearly neither has anyone else, hence the absence from the stdlib. As others have pointed out, there are alternative approaches, and plenty of recipes on ActiveState, which seem to have scratched wh

Re: pep 8 constants

2009-06-29 Thread Rhodri James
On Mon, 29 Jun 2009 20:28:07 +0100, Eric S. Johansson wrote: Rhodri James wrote: As far as I can tell, the only thing that you are even vaguely suggesting for convention use is underscores_with_everything. As promised, I laugh hollowly. I'm sorry. It may have been too subtle. I'm sugges

Re: Python Imaging Library download link broken?

2009-06-29 Thread magicus
On Mon Jun 29 2009 07:21:12 GMT-0400 (EDT) Lawrence D'Oliveiro typed: > In message , Tim Harig wrote: > >> On 2009-06-29, Lawrence D'Oliveiro >> wrote: >> >>> "apt-get install python-imaging", anybody? >> C:\>apt-get install python-imaging >> Bad command or file name > > Sounds more like broken

Re: Drawing in PDF

2009-06-29 Thread Jun
On Jun 30, 12:22 am, Emile van Sebille wrote: > On 6/29/2009 3:14 PM Jun said... > > > On Jun 30, 12:09 am, Emile van Sebille wrote: > >> On 6/29/2009 2:51 PM Jun said... > > >>> HEllo, > >>> I've a pdf file, and i want to draw some additional stuff on it, by > >>> example : some markup nota

Re: timer

2009-06-29 Thread Paul Moore
2009/6/29 MRAB : > superpollo wrote: >> >> hi folks. >> >> the follwing shoud print 'stuff' for 3 seconds and then stop. why it does >> not work? (prints stuff forever) >> >>      1 #!/usr/bin/python >>      2 >>      3 import threading >>      4 import sys >>      5 >>      6 t = threading.Timer(3

Re: timer

2009-06-29 Thread MRAB
superpollo wrote: hi folks. the follwing shoud print 'stuff' for 3 seconds and then stop. why it does not work? (prints stuff forever) 1 #!/usr/bin/python 2 3 import threading 4 import sys 5 6 t = threading.Timer(3.0, sys.exit) 7 t.start() 8 whi

Re: Drawing in PDF

2009-06-29 Thread Emile van Sebille
On 6/29/2009 3:14 PM Jun said... On Jun 30, 12:09 am, Emile van Sebille wrote: On 6/29/2009 2:51 PM Jun said... HEllo, I've a pdf file, and i want to draw some additional stuff on it, by example : some markup notation. Anyone has idea how to do that ? thank you in advance. ISTM that rep

Re: using input(), raw_input() to allow user to run different functions

2009-06-29 Thread MRAB
rhvonl...@gmail.com wrote: Something's been giving me difficulty.. We have a USB-attached device that we frequently debug with simple python scripts. The model has always been that each script logs on to the device, does something, then logs off. As it turns out, we have mostly written scripts

Re: Using Python for file packing

2009-06-29 Thread MRAB
Scott David Daniels wrote: Aaron Scott wrote: Do you mean like a zip or tar file? http://docs.python.org/library/zipfile.htmlhttp://docs.python.org/library/tarfile.html I had no idea you could access a single file from a ZIP or TAR without explicitly extracting it somewhere. Thanks. You

Re: Drawing in PDF

2009-06-29 Thread Jun
On Jun 30, 12:09 am, Emile van Sebille wrote: > On 6/29/2009 2:51 PM Jun said... > > > HEllo, > > > I've a pdf file, and i want to draw some additional stuff on it, by > > example : some markup notation. Anyone has idea how to do that ? > > thank you in advance. > > ISTM that reportlab's comm

Re: Drawing in PDF

2009-06-29 Thread Emile van Sebille
On 6/29/2009 2:51 PM Jun said... HEllo, I've a pdf file, and i want to draw some additional stuff on it, by example : some markup notation. Anyone has idea how to do that ? thank you in advance. ISTM that reportlab's commercial offering does that. http://www.reportlab.com/sectors/develop

Re: Drawing in PDF

2009-06-29 Thread Chris Rebert
On Mon, Jun 29, 2009 at 2:51 PM, Jun wrote: > HEllo, > > I've a pdf file, and i want to draw some additional stuff on it, by > example : some markup notation. Anyone has idea how to do that ? > thank you in advance. ReportLab (http://www.reportlab.org/) can do PDF generation, although it soun

Re: python library call equivalent to `which' command

2009-06-29 Thread MRAB
Tim Pinkawa wrote: On Mon, Jun 29, 2009 at 2:17 PM, Christian Heimes wrote: "if file in os.list()" is slow and not correct. You have to check if the file is either a real file or a symlink to a file and not a directory or special. Then you have to verify that the file has the executable bit, too

timer

2009-06-29 Thread superpollo
hi folks. the follwing shoud print 'stuff' for 3 seconds and then stop. why it does not work? (prints stuff forever) 1 #!/usr/bin/python 2 3 import threading 4 import sys 5 6 t = threading.Timer(3.0, sys.exit) 7 t.start() 8 while True: 9

Re: using input(), raw_input() to allow user to run different functions

2009-06-29 Thread Chris Rebert
On Mon, Jun 29, 2009 at 2:41 PM, rhvonl...@gmail.com wrote: > Something's been giving me difficulty.. > > We have a USB-attached device that we frequently debug with simple > python scripts.  The model has always been that each script logs on to > the device, does something, then logs off.  As it t

Re: Ctypes, pthreads and pthread_mutex_t

2009-06-29 Thread Gabriel Genellina
En Mon, 29 Jun 2009 13:19:31 -0300, Doug escribió: Has any converted the structure pthread_mutex_t to a ctypes structure class ? I looking at some C code that is using pthreads and need to translate pthreads_mutex_t structure into python (via ctypes) I think the pthread_mutex_t type is int

Drawing in PDF

2009-06-29 Thread Jun
HEllo, I've a pdf file, and i want to draw some additional stuff on it, by example : some markup notation. Anyone has idea how to do that ? thank you in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: No trees in the stdlib?

2009-06-29 Thread João Valverde
João Valverde wrote: Paul Rubin wrote: João Valverde writes: Interesting, thanks. The concept is not difficult to understand but I'm not sure it would be preferable. A copy operation should have the same cost as a "snapshot", You mean a deep-copy? That is unnecessarily expensive; wit

using input(), raw_input() to allow user to run different functions

2009-06-29 Thread rhvonl...@gmail.com
Something's been giving me difficulty.. We have a USB-attached device that we frequently debug with simple python scripts. The model has always been that each script logs on to the device, does something, then logs off. As it turns out, we have mostly written scripts as unit tests for each API c

Re: python library call equivalent to `which' command

2009-06-29 Thread Trent Mick
destroy wrote: Hi, I'm looking for a Python library function that provides the same functionality as the `which' command--namely, search the $PATH variable for a given string and see if it exists anywhere within. I currently examine the output from `which' itself, but I would like something

Re: Direct interaction with subprocess - the curse of blocking I/O

2009-06-29 Thread Scott David Daniels
Pascal Chambon wrote: I've had real issues with subprocesses recently : from a python script, on windows, I wanted to "give control" to a command line utility, i.e forward user in put to it and display its output on console Browsing the web, I found some hints : - use the advanced win32 api

Re: python library call equivalent to `which' command

2009-06-29 Thread Scott David Daniels
Robert Kern wrote: On 2009-06-29 14:31, Tim Pinkawa wrote: On Mon, Jun 29, 2009 at 2:17 PM, Christian Heimes wrote: "if file in os.list()" is slow and not correct. You have to check if the file is either a real file or a symlink to a file and not a directory or special. Then you have to verify

Re: Python Imaging Library download link broken?

2009-06-29 Thread Piet van Oostrum
> peter (p) wrote: >p> Whilst this is an interesting discussion about installers, I'm still >p> trying to find a copy of PIL. Any ideas? Pythonware is up again: http://pythonware.com/products/pil/index.htm -- Piet van Oostrum URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Private

Re: Using Python for file packing

2009-06-29 Thread Scott David Daniels
Aaron Scott wrote: Do you mean like a zip or tar file? http://docs.python.org/library/zipfile.htmlhttp://docs.python.org/library/tarfile.html I had no idea you could access a single file from a ZIP or TAR without explicitly extracting it somewhere. Thanks. You will find the zip format works

Re: alternative to JoinableQueue's please

2009-06-29 Thread Ethan Furman
ps: Thanks Raymond for the quick reply... and I feel rather apologetic for having bothered the list with this :S No need to feel that way -- many of us still learn from simple looking problems! :) ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Imaging Library download link broken?

2009-06-29 Thread peter
Thanks for this - looks promising. But I've just tried pythonware again and it's back up - so it was just a glitch after all. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Direct interaction with subprocess - the curse of blocking I/O

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 21:15:52 +0200, Pascal Chambon wrote: > I've had real issues with subprocesses recently : from a python script, > on windows, I wanted to "give control" to a command line utility, i.e > forward user in put to it and display its output on console. Are you talking about a pope

Re: What does Guido want in a GUI toolkit for Python?

2009-06-29 Thread Terry Reedy
Martin v. Löwis wrote: I sorta' wish he'd just come out and say, "This is what I think would be suitable for a GUI toolkit for Python: ...". He is not in the business of designing GUI toolkits, but in the business of designing programming languages. So he abstains from specifying (or even

Re: python library call equivalent to `which' command

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 21:53:42 +0200, Christian Heimes wrote: >> I am curious about it being slow, though. Is there a faster way to get >> the contents of a directory than os.listdir() or is there a faster way >> to see if an element is in a list other than "x in y"? I believe >> 'which' will termin

Re: Advantages of Python (for web/desktop apps)?

2009-06-29 Thread Michael Torrie
iceangel89 wrote: > i am mainly a PHP (mainly using Zend Framework MVC now) Web Developer. used > .NET (VB & C#) for Desktop apps. i nv used Python and am looking at Python > now (for desktop apps since its open source and just want to try what it > offers, but will like to know what good it has fo

Re: python library call equivalent to `which' command

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 14:31:25 -0500, Tim Pinkawa wrote: >> "if file in os.list()" is slow and not correct. You have to check if the >> file is either a real file or a symlink to a file and not a directory or >> special. Then you have to verify that the file has the executable bit, too. > > I reali

Re: Q: finding distance between 2 time's

2009-06-29 Thread Scott David Daniels
John Gordon wrote: In <023130ef$0$19421$c3e8...@news.astraweb.com> Steven D'Aprano writes: if time_difference < 3601: That's a potential off-by-one error. [...] The right test is: if time_difference <= 3600: Aren't those two comparisons the same? Only if time_difference is an integ

Re: Q: finding distance between 2 time's

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 19:15:08 +, John Gordon wrote: >> > if time_difference < 3601: > >> That's a potential off-by-one error. [...] The right test is: > >> if time_difference <= 3600: > > Aren't those two comparisons the same? Not if time_difference is a float. -- http://mail.pyth

Re: Tutorials on Jinja

2009-06-29 Thread wwwayne
On Thu, 25 Jun 2009 07:17:42 -0700 (PDT), Saurabh wrote: >On Jun 25, 2:04 am, Wayne Brehaut wrote: >> On Wed, 24 Jun 2009 11:46:55 -0700 (PDT), Saurabh >> >> wrote: >> >Hi All, >> >> >I am trying to move my application on a MVC architecture and plan to >> >use Jinja for the same. Can anyone pro

Re: python library call equivalent to `which' command

2009-06-29 Thread Christian Heimes
Tim Pinkawa wrote: > I realize four lines of Python does not replicate the functionality of > which exactly. It was intended to give the original poster something > to start with. Agreed! > I am curious about it being slow, though. Is there a faster way to get > the contents of a directory than o

Re: python library call equivalent to `which' command

2009-06-29 Thread Robert Kern
On 2009-06-29 14:31, Tim Pinkawa wrote: On Mon, Jun 29, 2009 at 2:17 PM, Christian Heimes wrote: "if file in os.list()" is slow and not correct. You have to check if the file is either a real file or a symlink to a file and not a directory or special. Then you have to verify that the file has t

Re: python library call equivalent to `which' command

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 13:53:30 -0500, Tim Pinkawa wrote: >> I'm looking for a Python library function that provides the same >> functionality as the `which' command--namely, search the $PATH >> variable for a given string and see if it exists anywhere within. I >> currently examine the output from

Re: python library call equivalent to `which' command

2009-06-29 Thread Tim Pinkawa
On Mon, Jun 29, 2009 at 2:31 PM, Tim Pinkawa wrote: > I am curious about it being slow, though. Is there a faster way to get > the contents of a directory than os.listdir() or is there a faster way > to see if an element is in a list other than "x in y"? I believe > 'which' will terminate once it f

Re: python library call equivalent to `which' command

2009-06-29 Thread Tim Pinkawa
On Mon, Jun 29, 2009 at 2:17 PM, Christian Heimes wrote: > "if file in os.list()" is slow and not correct. You have to check if the > file is either a real file or a symlink to a file and not a directory or > special. Then you have to verify that the file has the executable bit, too. I realize fou

Re: pep 8 constants

2009-06-29 Thread Eric S. Johansson
Rhodri James wrote: > On Mon, 29 Jun 2009 06:07:19 +0100, Eric S. Johansson > wrote: > >> Rhodri James wrote: >> >>> Reject away, but I'm afraid you've still got some work to do to >>> convince me that PEP 8 is more work for an SR system than any other >>> convention. >> > > [snip sundry example

Re: Q: finding distance between 2 time's

2009-06-29 Thread John Gordon
In <023130ef$0$19421$c3e8...@news.astraweb.com> Steven D'Aprano writes: > > if time_difference < 3601: > That's a potential off-by-one error. [...] The right test is: > if time_difference <= 3600: Aren't those two comparisons the same? -- John Gordon A is for Amy,

Re: python library call equivalent to `which' command

2009-06-29 Thread Christian Heimes
Tim Pinkawa wrote: > def which(file): > for path in os.environ["PATH"].split(":"): > if file in os.listdir(path): > print "%s/%s" % (path, file) "if file in os.list()" is slow and not correct. You have to check if the file is either a real file or a symlink to a

Direct interaction with subprocess - the curse of blocking I/O

2009-06-29 Thread Pascal Chambon
Hello everyone I've had real issues with subprocesses recently : from a python script, on windows, I wanted to "give control" to a command line utility, i.e forward user in put to it and display its output on console. It seems simple, but I ran into walls : - subprocess.communicate() only deal

Re: pep 8 constants

2009-06-29 Thread Eric S. Johansson
Ethan Furman wrote: > Eric S. Johansson wrote: >> >> yup how long will i[t] be before you become disablesd? maybe not as >> badly as I am >> but you should start feeling some hand problems in your later 40's to >> early 50's >> and it goes down hill from there. self preservation/interest comes t

Re: No trees in the stdlib?

2009-06-29 Thread Terry Reedy
Paul Rubin wrote: The idea is you can accomplish the equivalent of insertion or deletion by allocating a new root, along with the path down to the place you want to insert, i.e. O(log n) operations. So instead of mutating an existing tree, you create a new tree that shares most of its structure

TWiki Python API Wrapper

2009-06-29 Thread ma
Has anyone come across a decent python API wrapper for TWiki? I'm trying to automate some reports and logs to automatically post, create topics, and re-arrange a few things on our TWiki, but my googleFu has failed me :( I did find an interesting module in Perl, http://cpanratings.perl.org/dist/WWW

Re: python library call equivalent to `which' command

2009-06-29 Thread Tim Golden
Tim Pinkawa wrote: On Mon, Jun 29, 2009 at 12:54 PM, destroy wrote: Hi, I'm looking for a Python library function that provides the same functionality as the `which' command--namely, search the $PATH variable for a given string and see if it exists anywhere within. I currently examine the o

Re: python library call equivalent to `which' command

2009-06-29 Thread Tim Pinkawa
On Mon, Jun 29, 2009 at 12:54 PM, destroy wrote: > Hi, > I'm looking for a Python library function that provides the same > functionality as the `which' command--namely, search the $PATH > variable for a given string and see if it exists anywhere within. I > currently examine the output from `

Re: Python Imaging Library download link broken?

2009-06-29 Thread geo
On Jun 29, 2:54 pm, peter wrote: > Whilst this is an interesting discussion about installers, I'm still > trying to find a copy of PIL.  Any ideas? Hello, I had the very same problem and found this: http://www.portablepython.com/ It contains PIL and some other cool stuff. Hope it helps. Georg

Re: validating HTTPS certificates?

2009-06-29 Thread Heikki Toivonen
andras.horv...@cern.ch wrote: > I'm in the process of picking a language for a client application that > accesses a HTTPS (actually SOAP) server. This would be easy enough in > Python, but I came across a strange fact: neither httplib nor urllib > offer the possibility to actually verify the serve

Re: pep 8 constants

2009-06-29 Thread Ethan Furman
Eric S. Johansson wrote: yup how long will i[t] be before you become disablesd? maybe not as badly as I am but you should start feeling some hand problems in your later 40's to early 50's and it goes down hill from there. self preservation/interest comes to mind as a possible motive for acti

python library call equivalent to `which' command

2009-06-29 Thread destroooooy
Hi, I'm looking for a Python library function that provides the same functionality as the `which' command--namely, search the $PATH variable for a given string and see if it exists anywhere within. I currently examine the output from `which' itself, but I would like something more portable. I loo

Re: fork, threads and proper closing

2009-06-29 Thread OdarR
On 29 juin, 14:44, Francesco Bochicchio wrote: > On 29 Giu, 07:10, OdarR wrote: > > > > > On 28 juin, 23:26, Tomasz Pajor wrote: > > > > Hello, > > > > Configuration is as follows. > > > > I have a starter process which creates 3 sub processes (forks) and each > > > of this processes creates a n

Re: Creating an Instance Messenger type of application

2009-06-29 Thread Simon Forman
On Mon, Jun 29, 2009 at 12:44 PM, Elf Scripter wrote: > Thank you for correcting my mistake. > I checked google but nothing close. did you have any idea? > > On Mon, Jun 29, 2009 at 5:42 PM, Simon Forman wrote: >> >> On Mon, Jun 29, 2009 at 12:18 PM, Elf Scripter >> wrote: >> > Hello, >> > Has any

Re: pythonware.com down?

2009-06-29 Thread bunnybones
I'm having the same problem accessing pythonware or effbot. I can't find any news about their server status. I can ping both addresses just fine. Does anyone know what is going on? Maybe the ghosts of celebrities recently passed are mucking with the tubes. RIP Billy Mays -- http://mail.python.org

Re: Creating an Instance Messenger type of application

2009-06-29 Thread Simon Forman
On Mon, Jun 29, 2009 at 12:18 PM, Elf Scripter wrote: > Hello, > Has anyone created an Instance Messenger in Python before, i mean a simple > or Complex GUI based instance messenger? > I thought about something like, the client also act as server, has it`s own > listening port, but how can i handle

Re: Using Python for file packing

2009-06-29 Thread Aaron Scott
> Do you mean like a zip or tar file? > > http://docs.python.org/library/zipfile.htmlhttp://docs.python.org/library/tarfile.html > I had no idea you could access a single file from a ZIP or TAR without explicitly extracting it somewhere. Thanks. -- http://mail.python.org/mailman/listinfo/python-l

Re: Using Python for file packing

2009-06-29 Thread Kushal Kumaran
On Mon, Jun 29, 2009 at 9:17 PM, Aaron Scott wrote: > I'm working on a Python application right now that uses a large number > of audio assets. Instead of having a directory full of audio, I'd like > to pack all the audio into a single file. Is there any easy way to do > this in Python? My first in

Making code run in both source tree and installation path

2009-06-29 Thread Javier Collado
Hello, I would like to be able to run the main script in a python project from both the source tree and the path in which it's installed on Ubuntu. The script, among other things, imports a package which in turns makes use of some data files that contains some metadata that is needed in xml format

Ctypes, pthreads and pthread_mutex_t

2009-06-29 Thread Doug
Has any converted the structure pthread_mutex_t to a ctypes structure class ? I looking at some C code that is using pthreads and need to translate pthreads_mutex_t structure into python (via ctypes) Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 13:05:51 +0100, Paul Moore wrote: >> As for a bytes version of sys.argv and os.environ, you're welcome to >> propose a patch (this would be a separate issue on the aforementioned >> issue tracker). > > But please be aware that such a proposal would have to consider: > > 1. Th

Creating an Instance Messenger type of application

2009-06-29 Thread Elf Scripter
Hello,Has anyone created an Instance Messenger in Python before, i mean a simple or Complex GUI based instance messenger? I thought about something like, the client also act as server, has it`s own listening port, but how can i handle uer auth? and adding visual effects to it. Please i am not try

Re: creating garbage collectable objects (caching objects)

2009-06-29 Thread Dave Angel
Gabriel Genellina wrote: En Mon, 29 Jun 2009 08:01:20 -0300, Dave Angel escribió: News123 wrote: What I was more concerned is a group of output images depending on TWO or more input images. Depending on the platform (and the images) I might not be able to preload all two (or more images) S

Re: pep 8 constants

2009-06-29 Thread Eric S. Johansson
Tim Chase wrote: It sounds like the issue should be one of making your screen-reader > smarter, not dumbing down Python conventions. I don't know what SR > you're using (Jaws? Window Eyes? yasr? screeder? speakup? Naturally speaking is speech recognition (speech in text out) it is not text

Using Python for file packing

2009-06-29 Thread Aaron Scott
I'm working on a Python application right now that uses a large number of audio assets. Instead of having a directory full of audio, I'd like to pack all the audio into a single file. Is there any easy way to do this in Python? My first instinct was to attempt to pickle all the audio data, but some

Re: problems with mysql db

2009-06-29 Thread Scott David Daniels
golu wrote: here i have posted my code...plz tell why am i getting the error "int argument required" on the hash marked line(see below) although i am giving an int value ... url_count += 1 curse.execute("INSERT INTO URL_TABLE VALUES(%d,%s)", (url_count,file_path)

Re: pep 8 constants

2009-06-29 Thread Eric S. Johansson
alex23 wrote: > "Eric S. Johansson" wrote: >> no, I know the value if convention when editors can't tell you anything about >> the name in question. I would like to see more support for disabled >> programmers >> like myself and the thousands of programmers injured every year and forced to >> le

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 11:41:11 +, Antoine Pitrou wrote: > Nobody nowhere.com> writes: >> >> This results in an internal error: >> >> > "\udce4\udceb\udcef\udcf6\udcfc".encode("iso-8859-1", "surrogateescape") >> Traceback (most recent call last): >> File "", line 1, in >> SystemError: Objec

Find the name of a setup tools plugin when its class is known.

2009-06-29 Thread Mr SZ
Hi, Using pkg_resources, I can iterate through the plugins in an entrypoint and note down the plugin classes and all using "pkg_resources.iter_entry_points(ENTRYPOINT)" Now, when the plugin is loaded, I want to know it's entrypoint name as I have to load a bunch of settings identified by the

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 13:57:49 +0200, Hallvard B Furuseth wrote: >> Okay, that's useful, except that it may have some bugs: >> (...) >> Assuming that this gets fixed, it should make most of the problems with >> 3.0 solvable. OTOH, it wouldn't have killed them to have added e.g. >> sys.argv_bytes and

Python-URL! - weekly Python news and links (Jun 29)

2009-06-29 Thread Gabriel Genellina
QOTW: "Fortunately, I have assiduously avoided the real wor[l]d, and am happy to embrace the world from our 'bot overlords. Congratulations on another release from the hydra-like world of multi-head development." - Scott David Daniels, on release of 3.1 http://groups.google.com/group/comp.lan

Re: pep 8 constants

2009-06-29 Thread Eric S. Johansson
Peter Otten wrote: > Eric S. Johansson wrote: > >> MultiWordName mulitwordname >> very high error rate. many retries or hand hurting typing. > > Can you define macros in your speech recognition software? > > multiwordname > > might slightly lower the error rate. > Yes it would. I think it w

Re: problems with mysql db

2009-06-29 Thread Gabriel Genellina
En Mon, 29 Jun 2009 10:32:40 -0300, Petr Messner escribió: use %s instead of %d in SQL statements, because (AFAIK) conversions (including SQL escaping) from Python values to SQL values are done before the % operator is called - that value is not a number by that point. I hope you understood

Configuring Python for Tcl/Tk in UNIX

2009-06-29 Thread Chris Marshall
My goal is to use Tkinter on a ScientificLinux machine for a GUI I wrote. I installed Python 2.6.2, then built Tcl and Tk 8.5.7 from source. The final step is to configure Python 2.6 to run Tk. When I use the "make" command in the Python 2.6.2 directory, all is well until it tries to built _t

Re: creating garbage collectable objects (caching objects)

2009-06-29 Thread Gabriel Genellina
En Mon, 29 Jun 2009 08:01:20 -0300, Dave Angel escribió: News123 wrote: What I was more concerned is a group of output images depending on TWO or more input images. Depending on the platform (and the images) I might not be able to preload all two (or more images) So, as CPython's garbage c

Re: Running Invisible console Application

2009-06-29 Thread Charles Yeomans
On Jun 29, 2009, at 7:28 AM, Elf Scripter wrote: Hi, i have a console application that i want to ran (invisible) as a daemon, how can i do that? Search the web for python + daemon. I found plenty of code, including mostly prewritten solutions, for my own work. Charles Yemans -- http:/

  1   2   >