[svn r37445] use suprocess module to start socketserver subprocess
--HG-- branch : trunk
This commit is contained in:
parent
6d403d4573
commit
780e715395
|
@ -1,12 +1,13 @@
|
|||
|
||||
import os, sys
|
||||
import subprocess
|
||||
|
||||
if __name__ == '__main__':
|
||||
directory = os.path.dirname(os.path.abspath(sys.argv[0]))
|
||||
script = os.path.join(directory, 'socketserver.py')
|
||||
while 1:
|
||||
cmd = "python %s %s" % (script, " ".join(sys.argv[1:]))
|
||||
print "starting subcommand:", cmd
|
||||
f = os.popen(cmd)
|
||||
for line in f:
|
||||
print line,
|
||||
cmdlist = ["python", script]
|
||||
cmdlist.extend(sys.argv[1:])
|
||||
print "starting subcommand:", " ".join(cmdlist)
|
||||
process = subprocess.Popen(cmdlist)
|
||||
process.wait()
|
||||
|
|
Loading…
Reference in New Issue