grabbing return codes from os.system() call

Glenn W Jackman glennj at
Thu Mar 8 17:24:49 CET 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

Also have a look at the 'commands' module.


More information about the Python-list mailing list