From: rnv Date: Mon, 27 Jan 2014 15:08:42 +0000 (+0000) Subject: Run python scripts from command line on Windows platform. X-Git-Tag: V7_4_0a1~3^2~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=71d9ade1ecb75d95a2b284a4a041f8bf8ce6c8a9;p=modules%2Fkernel.git Run python scripts from command line on Windows platform. --- 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