How to call a system command with flexibility on Windows
Mark Hammond
mhammond at skippinet.com.au
Thu Jan 15 21:09:19 EST 2004
Nicolas Fleury wrote:
> Hi everyone,
> I have a hard time trying to call a system command with the
> following capability on Windows:
> - Redirection of stdout and stderr.
> - Have the return code.
>
> The documentation seems to say it's only possible on Unix, have I missed
> something. Thx for your help.
Some, if not all of the popen functions on Windows will return the exit
code of the program when closing the last returned handle. I'm afraid I
have no time to check the docs or find sample code, but it does work :)
Mark.
More information about the Python-list
mailing list