sys.argv with quoted strings as option argument
satya at ttck.keio.ac.jp
Thu Dec 11 08:12:25 CET 2003
I would like to send an option argument which is a quoted string with
whitespaces to a python program. For example:
$ ./myprogram.py --includedir="/usr/include /usr/local/include"
However, sys.argv breaks the arguments whenever it encounter spaces,
['./myprogram.py', '--includedir=/usr/include', '/usr/local/include',
So I can't seem to use getopt or optik to process such cases. Is there a
good way where I can preserve such option arguments with whitespaces?
Satya Nanda Vel Arjunan
Institute for Advanced Biosciences
More information about the Python-list