sys.argv as a list of bytes

Olive diolu at bigfoot.com
Wed Jan 18 02:16:12 EST 2012


In Unix the operating system pass argument as a list of C strings. But
C strings does corresponds to the bytes notions of Python3. Is it
possible to have sys.argv as a list of bytes ? What happens if I pass
to a program an argumpent containing funny "character", for example
(with a bash shell)?

python -i ./test.py $'\x01'$'\x05'$'\xFF'





More information about the Python-list mailing list