CreateProcess / redirect output

Achim Domma domma at procoders.net
Fri May 28 05:24:45 EDT 2004


Hi,

I try to start a process on windows using win32process.CreateProcess and
want to to redirect the output. I set the STARTF_USESTDHANDLES flag in the
STARTUPINFO structure. But I can not figure out, how to get the pipes
working. My app either deadlocks or displays the error messag:

...
    print win32file.ReadFile(readStdOut,10)
pywintypes.error: (109, 'ReadFile', 'The pipe has been ended.')

I think I'm not the only one which needs to get the output of an external
process on windows. Is there a simpler solutions or has somebody a working
example to share?

regards,
Achim





More information about the Python-list mailing list