]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Run python scripts from command line on Windows platform.
authorrnv <rnv@opencascade.com>
Mon, 27 Jan 2014 15:08:42 +0000 (15:08 +0000)
committerrnv <rnv@opencascade.com>
Mon, 27 Jan 2014 15:08:42 +0000 (15:08 +0000)
bin/nameserver.py
bin/server.py

index 46454429c174dd154fedd23c0845570a5ffb65dd..fe20cebbaf90ac0f9223955d5a813c641fa57229 100755 (executable)
@@ -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 , ' &']
index 8721d096fe7c97166f14870dd31b631cf4a29abe..804dcecc36d451ce4a7dac5c1e368cae770defcf 100755 (executable)
@@ -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