Is python shifting left 8 bits?
I'd be pretty surprised if python is returning the right values.
Example: os.system('grep foo /dev/null') returns 256
whereas the shell (and the man page) agree that the value is 1.
-steve