Unverified Kaydet (Commit) 38f4e468 authored tarafından Inada Naoki's avatar Inada Naoki Kaydeden (comit) GitHub

bpo-17110: doc: add note how to get bytes from sys.argv (GH-12602)

üst 7444daad
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment