31 args = command.split(
" ")
33 if sys.platform ==
"win32":
34 CREATE_NEW_PROCESS_GROUP = 0x00000200
35 subproc_args = {
'stdin':
None,
40 'creationflags': CREATE_NEW_PROCESS_GROUP}
42 subproc_args = {
'stdin':
None,
47 'preexec_fn': os.setsid}
50 p = subprocess.Popen(args, **subproc_args)
53 if sys.version_info[0:3] >= (2, 4, 0):
54 print traceback.format_exc()
56 _exc_list = traceback.format_exception(*sys.exc_info())
57 print "".join(_exc_list)
def launch_shell(command)
Launching a processint launch_shell(std::string command)