Re: Sending changed parameters into nested generators

2010-11-12 Thread John O'Hagan
On Sat, 13 Nov 2010, Steven D'Aprano wrote: > On Fri, 12 Nov 2010 09:47:26 +, John O'Hagan wrote: > > I have a generator function which takes as arguments another generator > > and a dictionary of other generators like this: > > > > def modgen(gen, gendict): > > for item in gen(): > >

Re: need some debug-infos on a simple regex

2010-11-12 Thread Steve Holden
On 11/12/2010 5:51 PM, Martin Gregorie wrote: > On Fri, 12 Nov 2010 17:21:04 -0800, Martin Kaspar wrote: > >> hello dear list! >> >> i'm very new to programming and self teaching myself. I'm having a >> problem with a little project. >> > This doesn't directly help with your problem, but the tool

Air Drop Pro iPhone Game Review

2010-11-12 Thread PHP.CCC
Air Drop Pro iPhone Game Review AirDrop Pro is is based on the aid delivery service within the third world etc. So we should all know what to expect from this iPhone and iPod Touch game. The format of the games goes like this a plane flies in a straight line through the screen from eithe

Re: Sending changed parameters into nested generators

2010-11-12 Thread Steven D'Aprano
On Fri, 12 Nov 2010 09:47:26 +, John O'Hagan wrote: > I have a generator function which takes as arguments another generator > and a dictionary of other generators like this: > > def modgen(gen, gendict): > for item in gen(): > for k, v in gendict: > do_something_calle

ANN: psutil 0.2.0 released

2010-11-12 Thread Giampaolo Rodolà
Hi, I'm pleased to announce the 0.2.0 release of psutil: http://code.google.com/p/psutil === About === psutil is a module providing an interface for retrieving information on running processes and system utilization (CPU, memory) in a portable way by using Python, implementing many functionalitie

Re: need some debug-infos on a simple regex

2010-11-12 Thread MRAB
On 13/11/2010 01:21, Martin Kaspar wrote: hello dear list! i'm very new to programming and self teaching myself. I'm having a problem with a little project. I'm trying to preform an fetch-process, but every time i try it i runs into errors. i have read the Python-documents for more than ten ho

Re: drawing with the mouse with turtle

2010-11-12 Thread Brian Blais
On Nov 12, 2010, at 8:05 PM, Steven D'Aprano wrote: > On Fri, 12 Nov 2010 19:24:50 -0500, Brian Blais wrote: > >> I'd like to draw on a turtle canvas, but use the mouse to direct the >> turtle. I don't see a good way of getting the mouse coordinates and the >> button state. > > I think the rig

Re: Sending changed parameters into nested generators

2010-11-12 Thread John O'Hagan
On Fri, 12 Nov 2010, Ian wrote: > On Nov 12, 2:47 am, "John O'Hagan" wrote: > > I have tried using a deep update function on the original nested > > dictionary, but this only works if I change the contents of a list, not > > if I want to, say, change a node from a list to a dictionary or vice > >

Re: need some debug-infos on a simple regex

2010-11-12 Thread Martin Gregorie
On Fri, 12 Nov 2010 17:21:04 -0800, Martin Kaspar wrote: > hello dear list! > > i'm very new to programming and self teaching myself. I'm having a > problem with a little project. > This doesn't directly help with your problem, but the tool at this URL: http://www.solmetra.com/scripts/regex/ may

need some debug-infos on a simple regex

2010-11-12 Thread Martin Kaspar
hello dear list! i'm very new to programming and self teaching myself. I'm having a problem with a little project. I'm trying to preform an fetch-process, but every time i try it i runs into errors. i have read the Python-documents for more than ten hours now! And i have several books here - bu

Re: drawing with the mouse with turtle

2010-11-12 Thread Steven D'Aprano
On Fri, 12 Nov 2010 19:24:50 -0500, Brian Blais wrote: > I'd like to draw on a turtle canvas, but use the mouse to direct the > turtle. I don't see a good way of getting the mouse coordinates and the > button state. I think the right way to do that is by creating an event handler to the turtle.

Re: How to test if a module exists?

2010-11-12 Thread Steve Holden
On 11/12/2010 3:51 PM, Steven D'Aprano wrote: > On Thu, 11 Nov 2010 16:51:38 -0800, Ethan Furman wrote: > >> Lawrence D'Oliveiro wrote: > >>> As for those who persisted in posting my address after being warned of >>> this, I’m still deciding what to do. >> >> You can be such an ass sometimes. >

drawing with the mouse with turtle

2010-11-12 Thread Brian Blais
I'd like to draw on a turtle canvas, but use the mouse to direct the turtle. I don't see a good way of getting the mouse coordinates and the button state. I tried to do something like this: import turtle def gothere(event): print event.x print event.y turtle.goto(event.x,event.y)

Re: How to test if a module exists?

2010-11-12 Thread Steven D'Aprano
On Thu, 11 Nov 2010 16:51:38 -0800, Ethan Furman wrote: > Lawrence D'Oliveiro wrote: >> As for those who persisted in posting my address after being warned of >> this, I’m still deciding what to do. > > You can be such an ass sometimes. "Sometimes"? -- Steven -- http://mail.python.org/mail

Re: Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-12 Thread Emile van Sebille
On 11/12/2010 2:03 PM George Burdell said... My understanding is that any object which is not pointed to by any variable will be automatically deleted. What if I create a class object, but only keep a reference to one of its members, and not a reference to the object itself? What goes on internal

Re: Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-12 Thread Steve Holden
On 11/12/2010 2:03 PM, George Burdell wrote: > My understanding is that any object which is not pointed to by any > variable will be automatically deleted. What if I create a class > object, but only keep a reference to one of its members, and not a > reference to the object itself? What goes on in

Re: Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-12 Thread Robert Kern
On 11/12/10 4:03 PM, George Burdell wrote: My understanding is that any object which is not pointed to by any variable will be automatically deleted. What if I create a class object, but only keep a reference to one of its members, and not a reference to the object itself? What goes on internally

Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-12 Thread George Burdell
My understanding is that any object which is not pointed to by any variable will be automatically deleted. What if I create a class object, but only keep a reference to one of its members, and not a reference to the object itself? What goes on internally in Python? Does Python retain the whole obje

Re: Is a 32-bit build faster than a 64-bit build

2010-11-12 Thread Stefan Behnel
Raymond Hettinger, 12.11.2010 22:24: Has anyone here benchmarked a 32-bit Python versus a 64-bit Python for Django or some other webserver? My hypotheses is that for apps not needing the 64-bit address space, the 32-bit version has better memory utilization and hence better cache performance.

Re: Is a 32-bit build faster than a 64-bit build

2010-11-12 Thread Stefan Sonnenberg-Carstens
Am 12.11.2010 22:24, schrieb Raymond Hettinger: My hypotheses is that for apps not needing the 64-bit address space, the 32-bit version has better memory utilization and hence better cache performance. If so, then switching python versions may enable a single server to handle a greater traffic l

Is a 32-bit build faster than a 64-bit build

2010-11-12 Thread Raymond Hettinger
Has anyone here benchmarked a 32-bit Python versus a 64-bit Python for Django or some other webserver? My hypotheses is that for apps not needing the 64-bit address space, the 32-bit version has better memory utilization and hence better cache performance. If so, then switching python versions ma

Re: Copy Protected PDFs and PIL

2010-11-12 Thread Steve Holden
On 11/12/2010 12:00 PM, Brett Bowman wrote: > Steve Holden - > A traceback sounds like a great idea, but I don't know how to go about > it, or know what is involved. Could you suggest a tutorial I could follow? > The traceback is the listing of modules and line numbers that you normally get when

Re: Copy Protected PDFs and PIL

2010-11-12 Thread Emile van Sebille
On 11/12/2010 12:00 PM Brett Bowman said... FATAL PDF disallows copying I ran into something like this about six months ago. IIRC, I was able to detect this setting (using reportlab I think), but a quick look to rediscover what I did specifically didn't yield anything useful. I'm pretty su

Re: Copy Protected PDFs and PIL

2010-11-12 Thread Robert Kern
On 11/12/10 2:00 PM, Brett Bowman wrote: > A whoops, good catch. I meant to say gfx and swftools. I'm using PIL to > modify the images once I get a PNG from swftools, and I mis-spoke. There is nothing you can do to catch the error. swftools is not written to be used as a Python library, so it

Re: A matter of queues, tasks and multiprocessing

2010-11-12 Thread John Nagle
On 11/12/2010 12:18 PM, John Nagle wrote: On 11/10/2010 9:25 AM, Emanuele D'Arrigo wrote: Greetings everybody, I've tried to come up with this message for a couple of weeks now and it doesn't look like I'm getting any clearer in my thoughts so I decided that it's probably best to take the plung

Re: A matter of queues, tasks and multiprocessing

2010-11-12 Thread John Nagle
On 11/10/2010 9:25 AM, Emanuele D'Arrigo wrote: Greetings everybody, I've tried to come up with this message for a couple of weeks now and it doesn't look like I'm getting any clearer in my thoughts so I decided that it's probably best to take the plunge and ask you guys to kindly throw me a rop

Re: Copy Protected PDFs and PIL

2010-11-12 Thread Brett Bowman
To answer various question: MRAB - I've tried worker threads, and it kills the thread only and not the program as a whole. I could use that as a work-around, but I would prefer something more direct, in case other problems arise. Steve Holden - A traceback sounds like a great idea, but I don't k

Newbie question about "import arcgisscripting"

2010-11-12 Thread Becky Kern
Hi, I'm a brand new Python 2.7 user, attempting to use it to convert a raster file to an ASCII file. I used ArcGis9.3 to create the raster file. My code begins with the line >>import arcgisscripting However, Python gives an error message "ImportError: DLL load failed: The specified module could

Re: importing site fails - why?

2010-11-12 Thread Stefan Sonnenberg-Carstens
Am 12.11.2010 20:24, schrieb Helmut Jarausch: On Fri, 12 Nov 2010 19:42:46 +0100, Stefan Sonnenberg-Carstens wrote: Am 12.11.2010 19:32, schrieb Helmut Jarausch: Hi, as often before, I've cloned a working system (GenToo) onto another machine. There, from a livecd and chroot to the cloned root

Re: importing site fails - why?

2010-11-12 Thread Helmut Jarausch
On Fri, 12 Nov 2010 19:42:46 +0100, Stefan Sonnenberg-Carstens wrote: > Am 12.11.2010 19:32, schrieb Helmut Jarausch: >> Hi, >> >> as often before, I've cloned a working system (GenToo) onto another >> machine. There, from a livecd and chroot to the cloned root partition >> >> python -v >> import

Re: Supporting Python 2.x and 3.x on a PC

2010-11-12 Thread Stefan Sonnenberg-Carstens
Am 12.11.2010 20:05, schrieb Doug Stell: I support multiple projects, some of which will remain on Python 2.x and some of which want to use Python 3.1.2. While I have installed both on my Windows PC, only the last installed version can be used. I do not have admin rights on the machine, so alteri

Supporting Python 2.x and 3.x on a PC

2010-11-12 Thread Doug Stell
I support multiple projects, some of which will remain on Python 2.x and some of which want to use Python 3.1.2. While I have installed both on my Windows PC, only the last installed version can be used. I do not have admin rights on the machine, so altering registry settings is not an option. Any

Re: importing site fails - why?

2010-11-12 Thread Stefan Sonnenberg-Carstens
Am 12.11.2010 19:32, schrieb Helmut Jarausch: Hi, as often before, I've cloned a working system (GenToo) onto another machine. There, from a livecd and chroot to the cloned root partition python -v import site fails with the following error Python 2.6.6 (r266:84292, Oct 13 2010, 09:06:24) [GCC

importing site fails - why?

2010-11-12 Thread Helmut Jarausch
Hi, as often before, I've cloned a working system (GenToo) onto another machine. There, from a livecd and chroot to the cloned root partition python -v import site fails with the following error Python 2.6.6 (r266:84292, Oct 13 2010, 09:06:24) [GCC 4.4.4] on linux2 Type "help", "copyright", "cr

Re: Sending changed parameters into nested generators

2010-11-12 Thread Arnaud Delobelle
"John O'Hagan" writes: > I have a generator function which takes as arguments another generator and a > dictionary of other generators like this: > > def modgen(gen, gendict): > for item in gen(): > for k, v in gendict: > do_something_called_k(item, v.next()) > yiel

=== LOAN AND INTERNSHIP PROGRAM ===

2010-11-12 Thread PHP.CCC
=== LOAN AND INTERNSHIP PROGRAM === European Union (EU) allows for the free movement of goods between Italy and other member states: Austria, Belgium, Bulgaria, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Latvia, Lithuania, Luxembourg, Malta, Neth

Re: Sending changed parameters into nested generators

2010-11-12 Thread Ian
On Nov 12, 2:47 am, "John O'Hagan" wrote: > I have tried using a deep update function on the original nested dictionary, > but this only works if I  change the contents of a list, not if I want to, > say, change a node from a list to a dictionary or vice versa, because in that > case I'm not opera

Re: Use company name for module

2010-11-12 Thread Robert Kern
On 11/12/10 8:12 AM, Micah Carrick wrote: My company is working on releasing some of our code as open-source python modules. I don't want my "foo" module conflicting with other modules called "foo" on PyPi or github or a user's system. Is there anything wrong, from a conventions standpoint, with

Re: subprocess.Popen deadlocks

2010-11-12 Thread eraserix
On Nov 12, 6:58 am, Lawrence D'Oliveiro wrote: > In message > <2cf9a225-7d1c-4490-8a62-807e79bdd...@n30g2000vbb.googlegroups.com>, > > Why not skip all the threads and just spawn all the processes in your main > loop? Then after getting the SIGINT, send that signal to all your processes, > and the

Re: A matter of queues, tasks and multiprocessing

2010-11-12 Thread Emanuele D'Arrigo
On Nov 11, 3:13 pm, Tim Golden wrote: > Try Celery > >    http://ask.github.com/celery/getting-started/introduction.html Thank you Tim, looks very interesting! Manu -- http://mail.python.org/mailman/listinfo/python-list

Use company name for module

2010-11-12 Thread Micah Carrick
My company is working on releasing some of our code as open-source python modules. I don't want my "foo" module conflicting with other modules called "foo" on PyPi or github or a user's system. Is there anything wrong, from a conventions standpoint, with having modules like company.foo and company.

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-12 Thread Neil Cerutti
On 2010-11-12, Martin Gregorie wrote: > On Thu, 11 Nov 2010 13:01:01 -0500, Steve Holden wrote: > >> Moving from one language to anther is not just a matter of >> transliterating the code. Of you try that you will end up with a messy >> code base that looks like PHP written in Python. > > "The det

http-headers for soappy

2010-11-12 Thread Johann Spies
How do I pass the following header Header name: Cookie Header value: [SID="the session identifier"] to SOAP.HeaderHandler(): class HeaderHandler: # Initially fail out if there are any problems. def __init__(self, header, attrs): for i in header.__dict__.keys():

Re: argparse '--' not working?

2010-11-12 Thread Peter Otten
Neal Becker wrote: > It is a 'standard' behaviour that a lone '--' terminates options. > argparse says: > > If you have positional arguments that must begin with '-' and don’t look > like negative numbers, you can insert the pseudo-argument '--' which tells > parse_args that everything after tha

argparse '--' not working?

2010-11-12 Thread Neal Becker
It is a 'standard' behaviour that a lone '--' terminates options. argparse says: If you have positional arguments that must begin with '-' and don’t look like negative numbers, you can insert the pseudo-argument '--' which tells parse_args that everything after that is a positional argument:

HAI WANT TO MEET FRIENDS FOR REAL FUN, CLICK FRIENDS-4-FUN

2010-11-12 Thread fun for u all
HAI WANT TO MEET FRIENDS FOR REAL FUN, CLICK FRIENDS-4-FUN http://tinyurl.com/friend-4-fun or http://goo.gl/1bour or http://tinyurl.com/friend-4-fun1 -- http://mail.python.org/mailman/listinfo/python-list

COM ERROR

2010-11-12 Thread Girish
Hello All, I have an issue while accessing COM API of an application. I got following error when I tried to run following command: win32com.client.Dispatch() File "C:\Python25\Lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch dispatch, userName = dynamic._GetGoodDispatch

Sending changed parameters into nested generators

2010-11-12 Thread John O'Hagan
I have a generator function which takes as arguments another generator and a dictionary of other generators like this: def modgen(gen, gendict): for item in gen(): for k, v in gendict: do_something_called_k(item, v.next()) yield item I want to control the outp

How can I read the information?

2010-11-12 Thread ChunLai Zhu
Hi, I'm learning the python program language.I get someinformation from the python-list,but I felt boring to read a text-information ,so how can I read the python-list's FAQs quickly? Thank you! -- *=:-)* *Keep Stupid,Keep Thirsty!* -- http://mail.python.org/mailman/listinfo/python-list

Re: os.tmpfile() vs. tempfile.TemporaryFile()

2010-11-12 Thread Carl Banks
On Nov 11, 10:32 am, John Nagle wrote: >    Is there any reason to prefer "tempfile.TemporaryFile()" > over "os.tmpfile()"?  Both create a nameless temporary file > that will be deleted on close. os.tmpfile calls your OS's tmpfile system call. tempfile.TemporaryFile creates the temporary file its

Re: Am I The Only One Who Keeps Reading “Numpy” as “Numpty”?

2010-11-12 Thread Stefan Behnel
rantingrick, 11.11.2010 19:07: On Nov 10, 5:35 pm, Arnaud Delobelle wrote: So pypy is "pie-pee", not "pie-pie" or "pee-pee". With that edifying thought, I'm off to bed. :) Good catch! Actually i've always thought of pypi as pie-pie and Scipy as cy-pie. Num-pie does not work for me. Maybe

What is the information I can get?

2010-11-12 Thread ChunLai Zhu
* Hello,I have knew the python mail list neamed python-list@python.org,I want to know what is the information I can get from the mail list?Thank you!* -- *=:-)* *Keep Stupid,Keep Thirsty!* -- http://mail.python.org/mailman/listinfo/python-list

Re: How to test if a module exists?

2010-11-12 Thread Tim Chase
On 11/11/10 14:26, Lawrence D'Oliveiro wrote: In message, Tim Chase wrote: Amusingly, as others have noted, you replied with an unobfuscated email address. This would seem to be an independent, true record of what membe

Re: Am I The Only One Who Keeps Reading “Numpy” as “Numpty”?

2010-11-12 Thread Daniel Fetchinson
As in Numpty Dumpty? > Sorry... -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list