[Patches] more docstrings for os

Michael Hudson mwh21@cam.ac.uk
Tue, 25 Apr 2000 09:00:45 +0100 (BST)


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.

Cheers,
M.

I confirm that, to the best of my knowledge and belief, this
contribution is free of any claims of third parties under
copyright, patent or other rights or interests ("claims").  To
the extent that I have any such claims, I hereby grant to CNRI a
nonexclusive, irrevocable, royalty-free, worldwide license to
reproduce, distribute, perform and/or display publicly, prepare
derivative versions, and otherwise use this contribution as part
of the Python software and its related documentation, or any
derivative versions thereof, at no cost to CNRI or its licensed
users, and to authorize others to do so.

I acknowledge that CNRI may, at its sole discretion, decide
whether or not to incorporate this contribution in the Python
software and its related documentation.  I further grant CNRI
permission to use my name and other identifying information
provided to CNRI by me for use in connection with the Python
software and its related documentation.

Index: os.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/os.py,v
retrieving revision 1.32
diff -u -r1.32 os.py
--- os.py	2000/04/21 18:35:36	1.32
+++ os.py	2000/04/25 07:57:25
@@ -183,23 +183,51 @@
     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 @@
 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):