the following script works fine with modest amount of
output from the subprocess, but hangs with 23 kB of output:
import subprocess
c = subprocess.Popen (['svnlook', 'diff',
'/home/svn/repos', '-r', '57'],
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
stderr = subprocess.STDOUT)
rc = c.wait ()
lines = [line.rstrip () for line in c.stdout.readlines ()]
if rc:
raise Exception (lines)
print lines
r57 in the above subversion repository produces a diff
of just under 23 kB, and the code hangs in:
^CTraceback (most recent call last):
File "/home/roman/tmp/scratch15", line 9, in ?
rc = c.wait ()
File "/usr/local/lib/python2.4/subprocess.py", line
1018, in wait
pid, sts = os.waitpid(self.pid, 0)
KeyboardInterrupt
this is with 2.4 built from the ports on
FreeBSD isis.sigpipe.cz 4.10-STABLE FreeBSD 4.10-STABLE
#3: Sat Aug 7 16:06:48 CEST 2004 i386
|