mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Reformat docstrings.
Standardize whitespace in function calls.
This commit is contained in:
parent
be86bdea73
commit
a30f7aca08
1 changed files with 39 additions and 36 deletions
|
@ -3,7 +3,8 @@
|
|||
Provides the 'spawn()' function, a front-end to various platform-
|
||||
specific functions for launching another program in a sub-process.
|
||||
Also provides the 'find_executable()' to search the path for a given
|
||||
executable name. """
|
||||
executable name.
|
||||
"""
|
||||
|
||||
# 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
|
||||
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
|
||||
arguments. There is no way to run a program with a name different
|
||||
from that of its executable.
|
||||
cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
|
||||
There is no way to run a program with a name different from that of its
|
||||
executable.
|
||||
|
||||
If 'search_path' is true (the default), the system's executable
|
||||
search path will be used to find the program; otherwise, cmd[0] must
|
||||
be the exact path to the executable. If 'verbose' is true, a
|
||||
one-line summary of the command will be printed before it is run.
|
||||
If 'dry_run' is true, the command will not actually be run.
|
||||
|
||||
Raise DistutilsExecError if running the program fails in any way;
|
||||
just return on success."""
|
||||
If 'search_path' is true (the default), the system's executable search
|
||||
path will be used to find the program; otherwise, cmd[0] must be the
|
||||
exact path to the executable. If 'verbose' is true, a one-line summary
|
||||
of the command will be printed before it is run. If 'dry_run' is true,
|
||||
the command will not actually be run.
|
||||
|
||||
Raise DistutilsExecError if running the program fails in any way; just
|
||||
return on success.
|
||||
"""
|
||||
if os.name == 'posix':
|
||||
_spawn_posix(cmd, search_path, verbose, dry_run)
|
||||
elif os.name == 'nt':
|
||||
|
@ -45,8 +46,10 @@ def spawn (cmd,
|
|||
|
||||
|
||||
def _nt_quote_args (args):
|
||||
"""Obscure quoting command line arguments on NT.
|
||||
Simply quote every argument which contains blanks."""
|
||||
"""Quote command-line arguments for DOS/Windows conventions: just
|
||||
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
|
||||
# say it'll work, I guess I'll have to accept it. (What if an arg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue