您可以使用ctypes
~$ python2 -B -R -uPython 2.7.9 (default, Dec 11 2014, 04:42:00) [GCC 4.9.2] on linux2Type "help", "copyright", "credits" or "license" for more information.Persistent session history and tab completion are enabled.>>> import ctypes>>> argv = ctypes.POINTER(ctypes.c_char_p)()>>> argc = ctypes.c_int()>>> ctypes.pythonapi.Py_GetArgcArgv(ctypes.byref(argc), ctypes.byref(argv))1227013240>>> argc.value4>>> argv[0]'python2'>>> argv[1]'-B'>>> argv[2]'-R'>>> argv[3]'-u'
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)