Get the complete command line as-is

Tim Golden mail at timgolden.me.uk
Thu Sep 13 11:25:38 CEST 2007


Thomas Heller wrote:
> Better would be this code:
> 
> import ctypes
> ctypes.windll.kernel32.GetCommandLineA.restype = ctypes.c_char_p
> print ctypes.windll.kernel32.GetCommandLineA()

Or you could use pywin32:

<code>
import win32api

print win32api.GetCommandLine ()

</code>

TJG



More information about the Python-list mailing list