X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPyConsole%2FPyConsole_Interp.cxx;h=c4b208180bb5c4a8d1c23cfe21bd4606afda42f9;hb=02904c3728214667f919cfe06072a91e1687b12f;hp=9d3d996caa3976c73a4ed41a16c7d6cbd83e12d9;hpb=ebedad009fafa24900d3cc8e9727a294b5c4dc34;p=modules%2Fgui.git diff --git a/src/PyConsole/PyConsole_Interp.cxx b/src/PyConsole/PyConsole_Interp.cxx index 9d3d996ca..c4b208180 100644 --- a/src/PyConsole/PyConsole_Interp.cxx +++ b/src/PyConsole/PyConsole_Interp.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // 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 @@ -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; }