bpo-23427: Add sys.orig_argv attribute (GH-20729)

Add sys.orig_argv attribute: the list of the original command line
arguments passed to the Python executable.

Rename also PyConfig._orig_argv to PyConfig.orig_argv and
document it.
This commit is contained in:
Victor Stinner 2020-06-30 00:49:03 +02:00 committed by GitHub
parent 2fb5f038f2
commit dd8a93e23b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 104 additions and 35 deletions

View file

@ -2931,6 +2931,7 @@ _PySys_InitMain(PyThreadState *tstate)
}
COPY_LIST("argv", config->argv);
COPY_LIST("orig_argv", config->orig_argv);
COPY_LIST("warnoptions", config->warnoptions);
PyObject *xoptions = sys_create_xoptions_dict(config);