From: mzn Date: Thu, 27 Sep 2018 08:33:25 +0000 (+0300) Subject: Issue #2646: Replace when delete parameter from partset does not work for part. X-Git-Tag: CEA_2018-2~62^2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=09f01ad0c5bed7d6eea1141899113fd6f69eb085;p=modules%2Fshaper.git Issue #2646: Replace when delete parameter from partset does not work for part. --- diff --git a/src/InitializationPlugin/InitializationPlugin_PyInterp.cpp b/src/InitializationPlugin/InitializationPlugin_PyInterp.cpp index b7d591b29..3d9f7e8e7 100644 --- a/src/InitializationPlugin/InitializationPlugin_PyInterp.cpp +++ b/src/InitializationPlugin/InitializationPlugin_PyInterp.cpp @@ -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