blanks embedded in python 2.3 optparse

Nagy László Zsolt nagylzs at freemail.hu
Tue Jul 29 18:19:40 EDT 2003


>
>
>is there a way to pass a param with blank embedded with optparse ?
>(C:\Python23\Doc\lib\module-optparse.html)
>
>
>for instance
>prog --name=mr jones
>
>
>and have "mister jones" as a single entry for name ?
>
>reading the docs I see nothing about that.
>
>the only thing is the nargs to pass nargs at a time, but here you can't tell
>in advance how many words in the name there is
>  
>

For Unix and windows:

prog --name="mr jones"

For unices, this should work too:

prog --name=mr\ jones

Know nothing about macs and others.

   Laci







More information about the Python-list mailing list