[svn r37444] a try at a wrapping loop_socketserver.py

that restarts the actual socketserver.py

--HG--
branch : trunk
This commit is contained in:
hpk
2007-01-27 19:57:05 +01:00
parent 3d70646122
commit 6d403d4573
2 changed files with 15 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
import os, sys
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,