Re: multiprocessing Pool.imap broken?

2011-03-31 Thread Yang Zhang
processing.Pool examples will not work in the interactive >> interpreter. > > Hope this helps, > > Kyle > > > On Tue, Mar 29, 2011 at 6:51 PM, Yang Zhang wrote: >> >> On Tue, Mar 29, 2011 at 6:44 PM, Yang Zhang >> wrote: >> > I've tried both th

Re: multiprocessing Pool.imap broken?

2011-03-31 Thread Yang Zhang
The problem was that Pool shuts down from its finalizer: http://stackoverflow.com/questions/5481104/multiprocessing-pool-imap-broken/5481610#5481610 On Wed, Mar 30, 2011 at 5:59 AM, eryksun () wrote: > On Tuesday, March 29, 2011 9:44:21 PM UTC-4, Yang Zhang wrote: >> I've

Re: multiprocessing Pool.imap broken?

2011-03-29 Thread Yang Zhang
On Tue, Mar 29, 2011 at 6:44 PM, Yang Zhang wrote: > I've tried both the multiprocessing included in the python2.6 Ubuntu > package (__version__ says 0.70a1) and the latest from PyPI (2.6.2.1). > In both cases I don't know how to use imap correctly - it causes the > enti

multiprocessing Pool.imap broken?

2011-03-29 Thread Yang Zhang
I've tried both the multiprocessing included in the python2.6 Ubuntu package (__version__ says 0.70a1) and the latest from PyPI (2.6.2.1). In both cases I don't know how to use imap correctly - it causes the entire interpreter to stop responding to ctrl-C's. Any hints? Thanks in advance. $ pytho

Re: Python subprocesses experience mysterious delay in receiving stdin EOF

2011-02-18 Thread Yang Zhang
riter FD - as long as p2 exists, p1 won't see EOF Turns out there's a `close_fds` parameter to `Popen`, so the solution is to pass `close_fds=True`. All simple and obvious in hindsight, but still managed to cost at least a couple eyeballs good chunks of time. On Sun, Feb 13, 2011 at 11:52 PM

Re: Python subprocesses experience mysterious delay in receiving stdin EOF

2011-02-13 Thread Yang Zhang
Anybody else see this issue? On Thu, Feb 10, 2011 at 10:37 AM, Yang Zhang wrote: > On Thu, Feb 10, 2011 at 12:28 AM, Jean-Michel Pichavant > wrote: >> Yang Zhang wrote: >>> >>> On Wed, Feb 9, 2011 at 11:01 AM, MRAB wrote: >>> >>>> >>>

Re: Python subprocesses experience mysterious delay in receiving stdin EOF

2011-02-09 Thread Yang Zhang
On Thu, Feb 10, 2011 at 12:28 AM, Jean-Michel Pichavant wrote: > Yang Zhang wrote: >> >> On Wed, Feb 9, 2011 at 11:01 AM, MRAB wrote: >> >>> >>> On 09/02/2011 01:59, Yang Zhang wrote: >>> >>>> >>>> I reduced a problem I was

Re: Python subprocesses experience mysterious delay in receiving stdin EOF

2011-02-09 Thread Yang Zhang
On Wed, Feb 9, 2011 at 11:01 AM, MRAB wrote: > On 09/02/2011 01:59, Yang Zhang wrote: >> >> I reduced a problem I was seeing in my application down into the >> following test case. In this code, a parent process concurrently >> spawns 2 (you can spawn more) subproces

Python subprocesses experience mysterious delay in receiving stdin EOF

2011-02-08 Thread Yang Zhang
ts: t.start() for t in ts: t.join() Example output: 0.001 0 starting 0.003 1 starting 0.005 0 writing 0.016 1 writing 0.093 0 closing 0.093 0 reading 0.094 1 closing 0.094 1 reading 0.098 .. 1 done reading 5.103 1 done 5.108 .. 0 done reading 10.113 0 done -- Yang Zhang http://yz.mit.edu/ -- http://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 weirdness

2009-01-19 Thread Yang Zhang
tringobject.c, line 107. Abort trap with a pop that says: "The application Python quit unexpectedly. The problem may have been caused by the _psycopg.so plug-in". -- I don't understand the error message above. The date did get passed correctly and am now not even using it, I use the hard coded date. So what is going on? Any help would be great. Thank you! Neha -- http://mail.python.org/mailman/listinfo/python-list -- Yang Zhang http://www.mit.edu/~y_z/ -- http://mail.python.org/mailman/listinfo/python-list

Unbuffered stdout/auto-flush

2008-06-21 Thread Yang Zhang
Hi, is there any way to get unbuffered stdout/stderr without relying on the -u flag to python or calling .flush() on each print (including indirect hacks like replacing sys.stdout with a wrapper that succeeds each write() with a flush())? Thanks in advance! -- Yang Zhang http://www.mit.edu

Python 2.5 "make install" bug?

2006-10-10 Thread Yang Zhang
All the site-packages/*.so files get copied to the directory specified in my ~/.pydistutils.cfg instead of lib-dynload under the prefix dir, then proceeds to chmod 755 all the files in that directory (including ones that existed before install). Please advise. -- http://mail.python.org/mailman/lis