mirror of
https://github.com/python/cpython.git
synced 2025-11-12 03:22:06 +00:00
parent
da6db4f8b0
commit
fe6f9d0edc
4 changed files with 10 additions and 3 deletions
|
|
@ -215,8 +215,10 @@ always available.
|
||||||
|
|
||||||
.. data:: executable
|
.. data:: executable
|
||||||
|
|
||||||
A string giving the name of the executable binary for the Python interpreter, on
|
A string giving the absolute path of the executable binary for the Python
|
||||||
systems where this makes sense.
|
interpreter, on systems where this makes sense. If Python is unable to retrieve
|
||||||
|
the real path to its executable, :data:`sys.executable` will be an empty string
|
||||||
|
or ``None``.
|
||||||
|
|
||||||
|
|
||||||
.. function:: exit([arg])
|
.. function:: exit([arg])
|
||||||
|
|
|
||||||
|
|
@ -471,6 +471,9 @@ def test_call_tracing(self):
|
||||||
self.assertRaises(TypeError, sys.call_tracing, str, 2)
|
self.assertRaises(TypeError, sys.call_tracing, str, 2)
|
||||||
|
|
||||||
def test_executable(self):
|
def test_executable(self):
|
||||||
|
# sys.executable should be absolute
|
||||||
|
self.assertEqual(os.path.abspath(sys.executable), sys.executable)
|
||||||
|
|
||||||
# Issue #7774: Ensure that sys.executable is an empty string if argv[0]
|
# Issue #7774: Ensure that sys.executable is an empty string if argv[0]
|
||||||
# has been set to an non existent program name and Python is unable to
|
# has been set to an non existent program name and Python is unable to
|
||||||
# retrieve the real program name
|
# retrieve the real program name
|
||||||
|
|
|
||||||
|
|
@ -509,6 +509,8 @@ Tests
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
- Issue #13402: Document absoluteness of sys.executable.
|
||||||
|
|
||||||
- Issue #13883: PYTHONCASEOK also works on OS X, OS/2, and RiscOS.
|
- Issue #13883: PYTHONCASEOK also works on OS X, OS/2, and RiscOS.
|
||||||
|
|
||||||
- Issue #2134: The tokenize documentation has been clarified to explain why
|
- Issue #2134: The tokenize documentation has been clarified to explain why
|
||||||
|
|
|
||||||
|
|
@ -1093,7 +1093,7 @@ version_info -- version information as a named tuple\n\
|
||||||
hexversion -- version information encoded as a single integer\n\
|
hexversion -- version information encoded as a single integer\n\
|
||||||
copyright -- copyright notice pertaining to this interpreter\n\
|
copyright -- copyright notice pertaining to this interpreter\n\
|
||||||
platform -- platform identifier\n\
|
platform -- platform identifier\n\
|
||||||
executable -- pathname of this Python interpreter\n\
|
executable -- absolute path of the executable binary of the Python interpreter\n\
|
||||||
prefix -- prefix used to find the Python library\n\
|
prefix -- prefix used to find the Python library\n\
|
||||||
exec_prefix -- prefix used to find the machine-specific Python library\n\
|
exec_prefix -- prefix used to find the machine-specific Python library\n\
|
||||||
float_repr_style -- string indicating the style of repr() output for floats\n\
|
float_repr_style -- string indicating the style of repr() output for floats\n\
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue