[Chicago] capturing output from subprocesses
Noel Thomas Taylor
nttaylor at uchicago.edu
Tue Nov 8 19:37:19 CET 2005
I could try that, but in the case of the real application whose output I
want to capture, I have no control over how much output it produces.
Do you have any thoughts about recapturing the output of an aborted child
process before the memory that is buffering its output gets blown away?
>> Did I understand you correctly that proc_communicate() should be able to
>> see unbuffered output as the subprocess is running?
> I would have guessed so, but I never tried. You might try printing a
> much bigger string every second -- one that should fill the buffer --
> and see what happens. I honestly don't know much about file buffering
> and the peculiarities of subprocess communication, maybe Martin will
> have more ideas than I. I was just focused on something like
> Proc.communicate that wouldn't absolutely require getting the entirely
> stdout result at once as a string -- but I just wanted to save memory in
> that case.
> Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
> Chicago mailing list
> Chicago at python.org
More information about the Chicago