Salome HOME
Python 3: creation of encode/decode functions
[modules/kernel.git] / src / KERNEL_PY / batchmode_salome.py
index d7645f7386d5f4f8e160f58fe3ee4f0ae288e620..8e361316437f00fc4a04e877b8e421222b52b2ea 100755 (executable)
@@ -35,10 +35,10 @@ from SALOME_NamingServicePy import *
 def ImportComponentGUI(ComponentName):
     libName = "lib" + ComponentName + "_Swig"
     command = "from " + libName + " import *"
-    exec ( command )
+    exec (command, globals())
     constructor = ComponentName + "GUI_Swig()"
     command = "gui = " + constructor
-    exec ( command )
+    exec (command, globals())
     return gui
 
     #--------------------------------------------------------------------------
@@ -293,7 +293,7 @@ if myStudyManager is None:
 aListOfOpenStudies = myStudyManager.GetOpenStudies();
 myStudy = None;
 if len(aListOfOpenStudies) == 0 :
-    myStudy = myStudyManager.NewStudy("Study1")
+    myStudy = myStudyManager.NewStudy("étude")
 else:
     myStudyName = aListOfOpenStudies[0]
     myStudy = myStudyManager.GetStudyByName(myStudyName)
@@ -301,5 +301,5 @@ else:
 myStudyName = myStudy._get_Name()
 
 myStudyId = myStudy._get_StudyId()
-#print myStudyId
+# print(myStudyId)