Get the complete command line as-is
laurent.pointal at limsi.fr
Wed Sep 12 09:20:04 CEST 2007
wangzq a écrit :
> 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.
As Windows command-line parsing seem to remove some chars, maybe you can
try to use the GetCommandLine() function from Win32 API (I dont know if
it is available in pywin32 package - you may need to write a wrapper
More information about the Python-list