please help me understand os.system() result
Roman Suzi
rnd at onego.ru
Wed May 21 02:09:20 EDT 2003
On Tue, 20 May 2003, Keisuke URAGO wrote:
> You should shift 8bits like this.
>
> >>> os.system("exit 7") >> 8
> 7
> >>> os.system("python -c 'import sys;sys.exit(1)'") >> 8
> 1
> >>> os.system("python -c 'import sys;sys.exit(2)'") >> 8
> 2
Thank you, I already guessed it.
However, it's strange that os.system() behaves like this on Linux and the
other way on WinNT/2000. (This is in the docs - so ok)
Sincerely yours, Roman A.Suzi
--
- Petrozavodsk - Karelia - Russia - mailto:rnd at onego.ru -
More information about the Python-list
mailing list