sys.argv with quoted strings as option argument
Jeff Epler
jepler at unpythonic.net
Wed Dec 10 18:41:23 EST 2003
It certainly doesn't work this way on my Unix system.
[jepler at parrot jepler]$ ls -l printargs.py
-rwxrwxr-x 1 jepler jepler 48 Dec 10 17:40 printargs.py
[jepler at parrot jepler]$ cat printargs.py
#!/usr/bin/env python
import sys
print sys.argv
[jepler at parrot jepler]$ ./printargs.py --includedir="/usr/include /usr/local/include" --libdir="/usr/lib /usr/local/lib"
['./printargs.py', '--includedir=/usr/include /usr/local/include', '--libdir=/usr/lib /usr/local/lib']
Jeff
More information about the Python-list
mailing list