Strange return value from os.system(...) call

Michael Fuhr mfuhr at
Wed Oct 13 06:15:41 CEST 2004

David Scott Williams <xiarcel at> writes:

> somevalue=os.system("/path/to/script")
> print "somevalue:"+str(somevalue)
> If my script exits with 0, somevalue is 0
> ...if it exits with 1, somevalue is 256

See the documentation for os.system(), os.wait(), and os.WEXITSTATUS():

Michael Fuhr

More information about the Python-list mailing list