Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
38f4e468
Commit
38f4e468
authored
Mar 30, 2019
by
Inada Naoki
Committed by
GitHub
Mar 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-17110: doc: add note how to get bytes from sys.argv (GH-12602)
parent
7444daad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
Doc/library/sys.rst
Doc/library/sys.rst
+6
-0
No files found.
Doc/library/sys.rst
View file @
38f4e468
...
...
@@ -30,6 +30,12 @@ always available.
To loop over the standard input, or the list of files given on the
command line, see the :mod:`fileinput` module.
.. note::
On Unix, command line arguments are passed by bytes from OS. Python decodes
them with filesystem encoding and "surrogateescape" error handler.
When you need original bytes, you can get it by
``[os.fsencode(arg) for arg in sys.argv]``.
.. data:: base_exec_prefix
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment