-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// 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
//
#include "SUITApp_init_python.hxx"
-
-PyThreadState* SUIT_PYTHON::_gtstate = NULL;
-PyObject *SUIT_PYTHON::salome_shared_modules_module = NULL;
-PyInterpreterState* SUIT_PYTHON::_interp = NULL;
bool SUIT_PYTHON::initialized = false;
void SUIT_PYTHON::init_python(int argc, char **argv)
Py_SetProgramName(argv[0]);
Py_Initialize(); // Initialize the interpreter
PySys_SetArgv(argc, argv);
- SUIT_PYTHON::_interp = PyThreadState_Get()->interp;
- PyEval_InitThreads(); // Create (and acquire) the interpreter lock
- SUIT_PYTHON::_gtstate = PyEval_SaveThread(); // Release global thread state
- SUIT_PYTHON::initialized = true;
+ PyEval_InitThreads(); // Create (and acquire) the interpreter lock - can be called many times
}