Salome HOME
Merge branch 'ASL_TREE_STATE' into asl/hydro_porting_741
[modules/gui.git] / src / PyConsole / PyConsole_Interp.cxx
index d230e9b12e1e4af677da1399e84e0d4f65f3e363..c4b208180bb5c4a8d1c23cfe21bd4606afda42f9 100644 (file)
@@ -77,6 +77,7 @@ bool PyConsole_Interp::initContext()
     PyErr_Print();
     return false;
   }  
-  _context = PyModule_GetDict(m);          // get interpreter dictionnary context
+  PyObject* global_dict = PyModule_GetDict(m);          // get interpreter dictionnary context
+  _context = PyDict_Copy(global_dict);
   return true;
 }