Get the complete command line as-is
TheFlyingDutchman
zzbbaadd at aol.com
Tue Sep 11 23:33:05 EDT 2007
On Sep 11, 8:00 pm, wangzq <wan... at gmail.com> wrote:
> Hello,
>
> I'm passing command line parameters to my browser, I need to pass the
> complete command line as-is, for example:
>
> test.py "abc def" xyz
>
> If I use ' '.join(sys.argv[1:]), then the double quotes around "abc
> def" is gone, but I need to pass the complete command line ("abc def"
> xyz) to the browser, how can I do this?
>
> I'm on Windows.
>
> Thanks.
I'm on Solaris and this works for me:
test.py '"abc def" xyz'
print sys.arv[1]
"abc def" xyz
More information about the Python-list
mailing list