summaryrefslogtreecommitdiffstats
path: root/Doc/library/sys.rst
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-06-29 22:49:03 (GMT)
committerGitHub <noreply@github.com>2020-06-29 22:49:03 (GMT)
commitdd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0 (patch)
treee313d1898cff674146bfb1fef17f082f56628ed4 /Doc/library/sys.rst
parent2fb5f038f2a2e91a7293d62dfd5601e6eb500c55 (diff)
downloadcpython-dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0.zip
cpython-dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0.tar.gz
cpython-dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0.tar.bz2
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.
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r--Doc/library/sys.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 880f252..d201d70 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -66,6 +66,8 @@ always available.
To loop over the standard input, or the list of files given on the
command line, see the :mod:`fileinput` module.
+ See also :data:`sys.orig_argv`.
+
.. note::
On Unix, command line arguments are passed by bytes from OS. Python decodes
them with filesystem encoding and "surrogateescape" error handler.
@@ -1037,6 +1039,16 @@ always available.
deleting essential items from the dictionary may cause Python to fail.
+.. data:: orig_argv
+
+ The list of the original command line arguments passed to the Python
+ executable.
+
+ See also :data:`sys.argv`.
+
+ .. versionadded:: 3.10
+
+
.. data:: path
.. index:: triple: module; search; path