|
|
@ -180,7 +180,7 @@ PyObject* PythonInterface::dbgOut = nil; |
|
|
|
PyObject* PythonInterface::dbgSlice = nil; // time slice function for the debug window
|
|
|
|
PyObject* PythonInterface::dbgSlice = nil; // time slice function for the debug window
|
|
|
|
plStatusLog* PythonInterface::dbgLog = nil; // output logfile
|
|
|
|
plStatusLog* PythonInterface::dbgLog = nil; // output logfile
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef PLASMA_EXTERNAL_RELEASE |
|
|
|
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE) |
|
|
|
bool PythonInterface::usePythonDebugger = false; |
|
|
|
bool PythonInterface::usePythonDebugger = false; |
|
|
|
plCyDebServer PythonInterface::debugServer; |
|
|
|
plCyDebServer PythonInterface::debugServer; |
|
|
|
bool PythonInterface::requestedExit = false; |
|
|
|
bool PythonInterface::requestedExit = false; |
|
|
@ -189,7 +189,7 @@ bool PythonInterface::requestedExit = false; |
|
|
|
// stupid Windows.h and who started including that!
|
|
|
|
// stupid Windows.h and who started including that!
|
|
|
|
#undef DrawText |
|
|
|
#undef DrawText |
|
|
|
|
|
|
|
|
|
|
|
#ifndef PLASMA_EXTERNAL_RELEASE |
|
|
|
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE) |
|
|
|
// Special includes for debugging
|
|
|
|
// Special includes for debugging
|
|
|
|
#include <frameobject.h> |
|
|
|
#include <frameobject.h> |
|
|
|
|
|
|
|
|
|
|
@ -840,7 +840,7 @@ void PythonInterface::initPython() |
|
|
|
Py_SetProgramName("plasma"); |
|
|
|
Py_SetProgramName("plasma"); |
|
|
|
Py_Initialize(); |
|
|
|
Py_Initialize(); |
|
|
|
|
|
|
|
|
|
|
|
#ifndef PLASMA_EXTERNAL_RELEASE |
|
|
|
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE) |
|
|
|
if (usePythonDebugger) |
|
|
|
if (usePythonDebugger) |
|
|
|
{ |
|
|
|
{ |
|
|
|
debugServer.SetCallbackClass(&debServerCallback); |
|
|
|
debugServer.SetCallbackClass(&debServerCallback); |
|
|
@ -1512,7 +1512,7 @@ void PythonInterface::finiPython() |
|
|
|
initialized--; |
|
|
|
initialized--; |
|
|
|
if ( initialized < 1 && Py_IsInitialized() != 0 && IsInShutdown ) |
|
|
|
if ( initialized < 1 && Py_IsInitialized() != 0 && IsInShutdown ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#ifndef PLASMA_EXTERNAL_RELEASE |
|
|
|
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE) |
|
|
|
if (usePythonDebugger) |
|
|
|
if (usePythonDebugger) |
|
|
|
debugServer.Disconnect(); |
|
|
|
debugServer.Disconnect(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -1659,7 +1659,7 @@ int PythonInterface::getOutputAndReset(std::string *output) |
|
|
|
pyOutputRedirector::ClearData(stdOut); |
|
|
|
pyOutputRedirector::ClearData(stdOut); |
|
|
|
|
|
|
|
|
|
|
|
// tell python debugger
|
|
|
|
// tell python debugger
|
|
|
|
#ifndef PLASMA_EXTERNAL_RELEASE |
|
|
|
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE) |
|
|
|
if (UsePythonDebugger()) |
|
|
|
if (UsePythonDebugger()) |
|
|
|
PythonInterface::PythonDebugger()->StdOut(strVal); |
|
|
|
PythonInterface::PythonDebugger()->StdOut(strVal); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|