summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2010-02-27 07:22:22 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2010-02-27 07:22:22 (GMT)
commitb6e8c7e8fb750e44b387557ad19afe2ccfe69f7c (patch)
tree25e5b445c8d511dc4c18f3c40196f69674577cdf /Doc
parent9a816974942a170a082bcef01a11aca806e854fe (diff)
downloadcpython-b6e8c7e8fb750e44b387557ad19afe2ccfe69f7c.zip
cpython-b6e8c7e8fb750e44b387557ad19afe2ccfe69f7c.tar.gz
cpython-b6e8c7e8fb750e44b387557ad19afe2ccfe69f7c.tar.bz2
Add an os.get_exec_path() function to return the list of directories
that launching a subprocess will search for the executable. Refactors some code in os._execvpe().
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/os.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index d01c8da..0547154 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -136,6 +136,17 @@ process and user.
These functions are described in :ref:`os-file-dir`.
+.. function:: get_exec_path(env=None)
+
+ Returns the list of directories that will be searched for a named
+ executable, similar to a shell, when launching a process.
+ *env*, when specified, should be an environment variable dictionary
+ to lookup the PATH in.
+ By default, when *env* is None, :data:`environ` is used.
+
+ .. versionadded:: 3.2
+
+
.. function:: ctermid()
Return the filename corresponding to the controlling terminal of the process.