From 71d9ade1ecb75d95a2b284a4a041f8bf8ce6c8a9 Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 27 Jan 2014 15:08:42 +0000 Subject: [PATCH] Run python scripts from command line on Windows platform. --- bin/nameserver.py | 2 +- bin/server.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/bin/nameserver.py b/bin/nameserver.py index 46454429c..fe20cebba 100755 --- a/bin/nameserver.py +++ b/bin/nameserver.py @@ -110,7 +110,7 @@ class NamingServer(Server): #print "port=", aPort if sys.platform == "win32": #print "start omniNames -start " + aPort + " -logdir " + upath - self.CMD=['omniNames -start ' , aPort , ' -nohostname ', ' -logdir ' , '\"' + upath + '\"', ' -errlog', '\"' + upath+'/omniNameErrors.log' + '\"'] + self.CMD=['omniNames', '-start' , aPort , '-nohostname', '-logdir' , os.path.realpath(upath), '-errlog', os.path.realpath(os.path.join(upath,'omniNameErrors.log'))] #os.system("start omniNames -start " + aPort + " -logdir " + upath) else: #self.CMD=['omniNames -start ' , aPort , ' -logdir ' , upath , ' &'] diff --git a/bin/server.py b/bin/server.py index 8721d096f..804dcecc3 100755 --- a/bin/server.py +++ b/bin/server.py @@ -70,11 +70,7 @@ class Server: #print "command = ", command if sys.platform == "win32": import win32pm - #cmd_str = "\"" + string.join(command, " ") + "\"" - #print cmd_str - #pid = win32pm.spawnpid( cmd_str ) - pid = win32pm.spawnpid( string.join(command, " "), '-nc' ) - #pid = win32pm.spawnpid( string.join(command, " ") ) + pid = win32pm.spawnpid( command, '-nc' ) elif Server.server_launch_mode == "fork": pid = os.spawnvp(os.P_NOWAIT, command[0], command) else: # Server launch mode is daemon -- 2.39.2