command = BuildCommandToLaunchRemoteContainer(theMachine,params,container_exe);
//redirect stdout and stderr in a file
- string logFilename="/tmp/"+_NS->ContainerName(params)+"_"+ theMachine +"_"+getenv( "USER" )+".log" ;
- command += " > " + logFilename + " 2>&1 &";
+#ifdef WNT
+ string logFilename=getenv("TEMP");
+ logFilename += "\\";
+#else
+ string logFilename="/tmp/";
+#endif
+ logFilename += _NS->ContainerName(params)+"_"+ theMachine +"_"+getenv( "USER" )+".log" ;
+ command += " > " + logFilename + " 2>&1";
+#ifdef WNT
+ command = "%PYTHONBIN% -c \"import win32pm ; win32pm.spawnpid(r'" + command + "', '')\"";
+#else
+ command += " &";
+#endif
// launch container with a system call
int status=system(command.c_str());
import visu_gui
medFileName = "pointe.med"
-medFile = os.getenv('DATA_DIR') + '/MedFiles/' + medFileName
+if sys.platform != "win32":
+ medFile = os.getenv('DATA_DIR') + '/MedFiles/' + medFileName
+else:
+ medFile = os.getenv('DATA_DIR') + '\\MedFiles\\' + medFileName
+ pass
print "Load ", medFile
studyCurrent = salome.myStudyName
if sys.platform != "win32":
tmpDir = "/tmp/"
else:
- tmpDir = os.getenv('TEMP') + '/'
+ tmpDir = os.getenv('TEMP') + '\\'
medFileNew = tmpDir + str(random.randint(0,1000000)) + "_" + medFileName
print " -- Copy " + medFile + " to " + medFileNew
os.system(copyCommand + " " + medFile + " " + medFileNew)
medFile = medFileNew
- os.system("chmod 755 " + medFile)
+ if sys.platform != "win32":
+ os.system("chmod 755 " + medFile)
+ pass
if os.access(medFile, os.W_OK) :
med_comp.readStructFileWithFieldType(medFile,studyCurrent)