grabbing return codes from os.system() call

Glenn W Jackman glennj at pcard31e.ca.nortel.com
Thu Mar 8 11:24:49 EST 2001


Pat Knight wrote:
>Look at the process management section of the os module documentation in
>Python. This contains functions to decode exit codes.
>
>Also, check the UNIX man pages for system, and the exec, exit and waitpid
>system calls. You'll find details of the encoding, and probably find that you
>can't have the large exit status values you want.
>
>If you're wanting to return strings or large numbers, start investigating
>os.popen.

Also have a look at the 'commands' module.

-- 
Glenn 



More information about the Python-list mailing list