]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
PR: add
authorprascle <prascle>
Wed, 2 Feb 2005 14:58:59 +0000 (14:58 +0000)
committerprascle <prascle>
Wed, 2 Feb 2005 14:58:59 +0000 (14:58 +0000)
  import salome
  salome.salome_init()
before import moduleGUI

src/SALOME_PYQT/SALOME_PYQT_GUI.cxx

index 09c9227a74182ae558b063e4c9cb291ae3c2f6ae..1ec297726eb7ffb32c1970d6136e4bd50f4d68ea 100644 (file)
@@ -66,6 +66,20 @@ void SALOME_PYQT_GUI::importModule()
 {
   PyLockWrapper aLock = interp->GetLockWrapper();
 
+  PyObjWrapper amod = PyImport_ImportModule("salome");
+  if(!amod){
+    MESSAGE ( " Problem import salome... " );
+    PyErr_Print();
+    return;
+  }
+
+  PyObjWrapper res(PyObject_CallMethod(amod,"salome_init",""));
+  if(!res){
+    MESSAGE ( " Problem... " );
+    PyErr_Print();
+    return;
+  }
+
   _module=PyImport_ImportModule((char*)_moduleName.c_str());
   if(!_module){
     MESSAGE ( " Problem... " );