summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-04-25 10:53:22 (GMT)
committerGuido van Rossum <guido@python.org>2000-04-25 10:53:22 (GMT)
commit7da3cc5dfbbc722238a6140acccba469f66e7fac (patch)
tree6db3d7ca80e6db367533d4c80671f48cb706265c /Lib/os.py
parente7ab64e0702b460bd643c6b0630d37d09614ad46 (diff)
downloadcpython-7da3cc5dfbbc722238a6140acccba469f66e7fac.zip
cpython-7da3cc5dfbbc722238a6140acccba469f66e7fac.tar.gz
cpython-7da3cc5dfbbc722238a6140acccba469f66e7fac.tar.bz2
Michael Hudson:
I think that after this patch, all objects in the os module (with names that don't start with "_") that can have docstrings, do, on Linux at least. Also fix a nit in one of my spawn* docstrings.
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py30
1 files changed, 29 insertions, 1 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 9bc5bd4..7f70f30 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -183,23 +183,51 @@ except NameError:
environ = {}
def execl(file, *args):
+ """execl(file, *args)
+
+ Execute the executable file with argument list args, replacing the
+ current process. """
execv(file, args)
def execle(file, *args):
+ """execle(file, *args, env)
+
+ Execute the executable file with argument list args and
+ environment env, replacing the current process. """
env = args[-1]
execve(file, args[:-1], env)
def execlp(file, *args):
+ """execlp(file, *args)
+
+ Execute the executable file (which is searched for along $PATH)
+ with argument list args, replacing the current process. """
execvp(file, args)
def execlpe(file, *args):
+ """execlpe(file, *args, env)
+
+ Execute the executable file (which is searched for along $PATH)
+ with argument list args and environment env, replacing the current
+ process. """
env = args[-1]
execvpe(file, args[:-1], env)
def execvp(file, args):
+ """execp(file, args)
+
+ Execute the executable file (which is searched for along $PATH)
+ with argument list args, replacing the current process.
+ args may be a list or tupe of strings. """
_execvpe(file, args)
def execvpe(file, args, env):
+ """execv(file, args, env)
+
+ Execute the executable file (which is searched for along $PATH)
+ with argument list args and environment env , replacing the
+ current process.
+ args may be a list or tupe of strings. """
_execvpe(file, args, env)
_notfound = None
@@ -338,7 +366,7 @@ if _exists("fork") and not _exists("spawnv") and _exists("execv"):
Execute file with arguments from args in a subprocess.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
-otherwise return - (the signal that killed it). """
+otherwise return -SIG, where SIG is the signal that killed it. """
return _spawnvef(mode, file, args, None, execv)
def spawnve(mode, file, args, env):