mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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:
parent
2fb5f038f2
commit
dd8a93e23b
9 changed files with 104 additions and 35 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue