#define _POSIX_C_SOURCE 200112L
extern "C" void init_enigma();
extern "C" void eBaseInit(void);
+extern "C" void eConsoleInit(void);
extern void bsodFatal();
#define SKIP_PART2
init_enigma();
eBaseInit();
+ eConsoleInit();
}
ePython::~ePython()
Py_Finalize();
}
+int ePython::execFile(const char *file)
+{
+ FILE *fp = fopen(file, "r");
+ if (!fp)
+ return -ENOENT;
+ int ret = PyRun_SimpleFile(fp, file);
+ fclose(fp);
+ return ret;
+}
+
int ePython::execute(const std::string &pythonfile, const std::string &funcname)
{
ePyObject pName, pModule, pDict, pFunc, pArgs, pValue;