[python-win32] How to monitor the stdout/stderr of somecmd.exe
Sean
null-python-win32 at tinfoilhat.ca
Wed Jun 23 18:19:51 EDT 2004
->f = win32pipe.popen("c:\python23\python sometask.py", 'r') while 1:
Redirect stderr (descriptor 2) to stdout (descriptor 1) and set the io
buffer size to some number at least as small as your smalled expected
output (could be 0 as well but I'm not 100% sure on how that will affect things).
buffersize=len("now: Fri Jun 18 10:22:43 2004 process : Fri Jun 18 10:22:36 2004")
f = win32pipe.popen("c:\python23\python sometask.py 2>1", 'r', buffersize)
Hopefully that points you in the right direction.
That is all,
--
Sean
More information about the Python-win32
mailing list