command exit status on windows

Felix McAllister felix_mcallister at hotmail.com
Wed Sep 24 08:27:06 EDT 2003


On Windows NT, 2000, 2003 and XP this generally works as well, although you'll find that some command line applications specifically written for Windows don't bother with a return code.

I can't comment about Windows 95, 98 or ME.

The os.system call (which works on both Unix and Windows) returns the correct status code.

Felix
> Hello,
> 
> Is there a way to check if a command executed in ms-dos returns 0 (success)
> or greater than 0 (fail) ?
> 
> In Unix the module commands.getstatusoutput returns exit status..
> 
> 
> Thanks in advance.
> 
> -SV




More information about the Python-list mailing list