X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/8132b29596b975f3e1764862ea7aa5661a8cb5ed..d85c75fc186d91f497d5997982db94259b041280:/lib/python/python.cpp diff --git a/lib/python/python.cpp b/lib/python/python.cpp index 2d84287b..119bff1c 100644 --- a/lib/python/python.cpp +++ b/lib/python/python.cpp @@ -6,6 +6,7 @@ #include extern "C" void init_enigma(); +extern void bsodFatal(); DEFINE_REF(TestObj); @@ -59,6 +60,10 @@ ePyObject &ePyObject::operator=(void *object) ePython::ePython() { +// Py_VerboseFlag = 1; + +// Py_OptimizeFlag = 1; + Py_Initialize(); init_enigma(); @@ -72,9 +77,8 @@ ePython::~ePython() int ePython::execute(const std::string &pythonfile, const std::string &funcname) { PyObject *pName, *pModule, *pDict, *pFunc, *pArgs, *pValue; - pName = PyString_FromString(pythonfile.c_str()); - + pModule = PyImport_Import(pName); Py_DECREF(pName); @@ -127,6 +131,7 @@ int ePython::call(PyObject *pFunc, PyObject *pArgs) } else { PyErr_Print(); + bsodFatal(); } } return res;