def get_unicode_sys_argv():
 from ctypes import POINTER, byref, cdll, c_int, windll
 from ctypes.wintypes import LPCWSTR, LPWSTR
 GetCommandLineW = cdll.kernel32.GetCommandLineW
 GetCommandLineW.argtypes = []
 GetCommandLineW.restype = LPCWSTR
 CommandLineToArgvW = windll.shell32.CommandLineToArgvW
 CommandLineToArgvW.argtypes = [LPCWSTR, POINTER(c_int)]
 CommandLineToArgvW.restype = POINTER(LPWSTR)
 cmd = GetCommandLineW()
 argc = c_int(0)
 argv = CommandLineToArgvW(cmd, byref(argc))
 if (argc.value > 0):
  start = (argc.value - len(sys.argv))
  return [argv[i] for i in xrange(start, argc.value)]

def get_unicode_sys_argv ( ) : from ctypes import POINTER , byref , cdll , c_int , windll from ctypes . wintypes import LPCWSTR , LPWSTR GetCommandLineW = cdll . kernel32 . GetCommandLineW GetCommandLineW . argtypes = [ ] GetCommandLineW . restype = LPCWSTR CommandLineToArgvW = windll . shell32 . CommandLineToArgvW CommandLineToArgvW . argtypes = [ LPCWSTR , POINTER ( c_int ) ] CommandLineToArgvW . restype = POINTER ( LPWSTR ) cmd = GetCommandLineW ( ) argc = c_int ( 0 ) argv = CommandLineToArgvW ( cmd , byref ( argc ) ) if ( argc . value > 0 ) : start = ( argc . value - len ( sys . argv ) ) return [ argv [ i ] for i in xrange ( start , argc . value ) ]
uses shell32 .