Pipe error codes off by a factor of 256

Jonathan Giddy jon at bezek.csse.monash.edu.au
Thu Dec 16 18:16:52 EST 1999


Skip Montanaro <skip at mojam.com> writes:

] That's the way the underlying popen works, and it's documented, sort of.
] From the os lib reference page:
] 
]     The exit status of the command (encoded in the format specified for
]     wait()) is available as the return value of the close() method of the
]     file object, except that when the exit status is zero (termination
]     without errors), None is returned.
] 
] Unfortunately, I don't find any documentation on wait's return status.
] 
The os module provides access to the exit status parsing functions WEXITSTATUS 
and friends.  They are documented in the Process Management section of the
os module docs.



More information about the Python-list mailing list