CreateProcess / redirect output

Richie Hindle richie at entrian.com
Fri May 28 06:04:51 EDT 2004


[Achim]
> I try to start a process on windows using win32process.CreateProcess [...]
> I think I'm not the only one which needs to get the output of an external
> process on windows.

Unless you have a specific reason for using CreateProcess, you can use
os.popen*() - see http://www.python.org/doc/current/lib/os-newstreams.html

If you really do need to use CreateProcess, this might help:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/creating_a_child_process_with_redirected_input_and_output.asp

-- 
Richie Hindle
richie at entrian.com





More information about the Python-list mailing list