X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPyConsole%2FPyConsole_EnhInterp.cxx;h=1f5defe0714bde0bcf29d7593ffcae097c4fcab9;hb=949661e3432745e77dfc32ac83ee7d06c7e57ced;hp=c648086228c7e9a8eab5bc791428081900908b68;hpb=58b7578f378ab1e49f912e1f288a7c5e05dd4c73;p=modules%2Fgui.git diff --git a/src/PyConsole/PyConsole_EnhInterp.cxx b/src/PyConsole/PyConsole_EnhInterp.cxx index c64808622..1f5defe07 100644 --- a/src/PyConsole/PyConsole_EnhInterp.cxx +++ b/src/PyConsole/PyConsole_EnhInterp.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -73,7 +73,7 @@ int PyConsole_EnhInterp::runDirCommand(const QString & dirArgument, const QStrin if (dirArgument.trimmed() != "") cmd = dirArgument + "."; cmd += _last_matches[0] + ".__doc__"; - PyObject * str = PyRun_String(cmd.toStdString().c_str(), Py_eval_input, _g, _g); + PyObject * str = PyRun_String(cmd.toStdString().c_str(), Py_eval_input, _global_context, _local_context); if (!str || str == Py_None || !PyString_Check(str)) { if (!str) @@ -104,7 +104,7 @@ int PyConsole_EnhInterp::runDirAndExtract(const QString& dirArgument, { QRegExp re("^[A-Z].+_[A-Z]+[a-z]+.+$"); // discard SWIG static method, e.g. MEDCouplingUMesh_Blabla QString command("dir(" + dirArgument + ")"); - PyObject * plst = PyRun_String(command.toStdString().c_str(), Py_eval_input, _g, _g); + PyObject * plst = PyRun_String(command.toStdString().c_str(), Py_eval_input, _global_context, _local_context); if(!plst || plst == Py_None) { if(!plst) PyErr_Clear();