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
#--------------------------------------------------------------------------
if IN_SALOME_GUI:
libName = "lib" + ComponentName + "_Swig"
command = "from " + libName + " import *"
- exec ( command )
+ exec (command, globals())
constructor = ComponentName + "_Swig()"
command = "gui = " + constructor
- exec ( command )
- return gui
+ exec (command, globals())
+ return gui # @UndefinedVariable
else:
print("Warning: ImportComponentGUI(",ComponentName,") outside GUI !")
print("calls to GUI methods may crash...")
def getSelected(self, i):
"""Get the selection number i """
print("SalomeOutsideGUI: no selection mecanism available outside GUI")
- return none
+ return None
def AddIObject(self, Entry):
"""Add an entry"""