]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2646: Replace when delete parameter from partset does not work for part.
authormzn <mzn@opencascade.com>
Thu, 27 Sep 2018 08:33:25 +0000 (11:33 +0300)
committermzn <mzn@opencascade.com>
Thu, 27 Sep 2018 08:33:25 +0000 (11:33 +0300)
src/InitializationPlugin/InitializationPlugin_PyInterp.cpp

index b7d591b29c184ac7dae0caed20b00afbcd46436d..3d9f7e8e75fadd8a54f9746befa442e626363fae 100644 (file)
@@ -63,8 +63,7 @@ InitializationPlugin_PyInterp::positions(const std::string& theExpression,
 
   // prepare a context
   PyObject* aContext = PyDict_New();
-  PyObject* aBuiltinModule = PyImport_AddModule("__builtin__");
-  PyDict_SetItemString(aContext, "__builtins__", aBuiltinModule);
+  PyDict_SetItemString(aContext, "__builtins__", PyEval_GetBuiltins());
 
   std::string anExpression = adjustExpression(theExpression);
   // extend aContext with variables