Reformat docstrings.

Standardize whitespace in function calls.
This commit is contained in:
Greg Ward 2000-09-26 02:00:51 +00:00
parent be86bdea73
commit a30f7aca08

View file

@ -3,7 +3,8 @@
Provides the 'spawn()' function, a front-end to various platform- Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process. specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given Also provides the 'find_executable()' to search the path for a given
executable name. """ executable name.
"""
# created 1999/07/24, Greg Ward # created 1999/07/24, Greg Ward
@ -20,19 +21,19 @@ def spawn (cmd,
"""Run another program, specified as a command list 'cmd', in a new """Run another program, specified as a command list 'cmd', in a new
process. 'cmd' is just the argument list for the new process, ie. process. 'cmd' is just the argument list for the new process, ie.
cmd[0] is the program to run and cmd[1:] are the rest of its cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
arguments. There is no way to run a program with a name different There is no way to run a program with a name different from that of its
from that of its executable. executable.
If 'search_path' is true (the default), the system's executable If 'search_path' is true (the default), the system's executable search
search path will be used to find the program; otherwise, cmd[0] must path will be used to find the program; otherwise, cmd[0] must be the
be the exact path to the executable. If 'verbose' is true, a exact path to the executable. If 'verbose' is true, a one-line summary
one-line summary of the command will be printed before it is run. of the command will be printed before it is run. If 'dry_run' is true,
If 'dry_run' is true, the command will not actually be run. the command will not actually be run.
Raise DistutilsExecError if running the program fails in any way;
just return on success."""
Raise DistutilsExecError if running the program fails in any way; just
return on success.
"""
if os.name == 'posix': if os.name == 'posix':
_spawn_posix(cmd, search_path, verbose, dry_run) _spawn_posix(cmd, search_path, verbose, dry_run)
elif os.name == 'nt': elif os.name == 'nt':
@ -45,8 +46,10 @@ def spawn (cmd,
def _nt_quote_args (args): def _nt_quote_args (args):
"""Obscure quoting command line arguments on NT. """Quote command-line arguments for DOS/Windows conventions: just
Simply quote every argument which contains blanks.""" wraps every argument which contains blanks in double quotes, and
returns a new argument list.
"""
# XXX this doesn't seem very robust to me -- but if the Windows guys # XXX this doesn't seem very robust to me -- but if the Windows guys
# say it'll work, I guess I'll have to accept it. (What if an arg # say it'll work, I guess I'll have to accept it. (What if an arg