How to call a system command with flexibility on Windows
Francis Avila
francisgavila at yahoo.com
Mon Jan 12 17:13:51 EST 2004
Peter Hansen wrote in message <40031266.B76A5B6F at engcorp.com>...
>It can be done on Windows, although at the very least you cannot redirect
>stderr properly from the command line on Win98.... not sure about other
>issues.
Win98 is particularly bad:
>>> os.system('dir')
#output snipped
0 #return code
>>> os.system('foo')
Bad command or file name
0
>>>
>I'm pretty sure return codes are available with os.system() under Windows,
>but I rarely use them and forget any relevant details.
--
Francis Avila
More information about the Python-list
mailing list