Home | History | Annotate | Download | only in distutils

Lines Matching refs:cmd

17 def spawn(cmd, search_path=1, verbose=0, dry_run=0):
18 """Run another program, specified as a command list 'cmd', in a new process.
20 'cmd' is just the argument list for the new process, ie.
21 cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
26 search path will be used to find the program; otherwise, cmd[0]
34 _spawn_posix(cmd, search_path, dry_run=dry_run)
36 _spawn_nt(cmd, search_path, dry_run=dry_run)
38 _spawn_os2(cmd, search_path, dry_run=dry_run)
59 def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0):
60 executable = cmd[0]
61 cmd = _nt_quote_args(cmd)
65 log.info(' '.join([executable] + cmd[1:]))
69 rc = os.spawnv(os.P_WAIT, executable, cmd)
73 "command '%s' failed: %s" % (cmd[0], exc[-1])
77 "command '%s' failed with exit status %d" % (cmd[0], rc)
79 def _spawn_os2(cmd, search_path=1, verbose=0, dry_run=0):
80 executable = cmd[0]
84 log.info(' '.join([executable] + cmd[1:]))
88 rc = os.spawnv(os.P_WAIT, executable, cmd)
92 "command '%s' failed: %s" % (cmd[0], exc[-1])
95 log.debug("command '%s' failed with exit status %d" % (cmd[0], rc))
97 "command '%s' failed with exit status %d" % (cmd[0], rc)
104 def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0):
105 log.info(' '.join(cmd))
109 exec_args = [cmd[0], cmd]
138 (cmd[0], e.strerror))
141 sys.stderr.write("unable to execute %s for unknown reasons" % cmd[0])
154 "command '%s' failed: %s" % (cmd[0], exc[-1])
158 (cmd[0], os.WTERMSIG(status))
167 (cmd[0], exit_status)
175 (cmd[0], status)