5 #ifndef CNOID_PYTHON_PLUGIN_PYTHON_EXECUTOR_H
6 #define CNOID_PYTHON_PLUGIN_PYTHON_EXECUTOR_H
8 #include <cnoid/PyUtil>
9 #include <cnoid/Signal>
10 #include "exportdecl.h"
21 static void setModuleRefreshEnabled(
bool on);
27 void setBackgroundMode(
bool on);
28 bool isBackgroundMode()
const;
30 enum State { NOT_RUNNING, RUNNING_FOREGROUND, RUNNING_BACKGROUND };
34 bool eval(
const std::string& code);
37 python::object returnValue();
42 bool execCode(
const std::string& code);
43 bool execFile(
const std::string& filename);
44 bool waitToFinish(
double timeout);
48 bool hasException()
const;
49 const std::string exceptionTypeName()
const;
50 const std::string exceptionText()
const;
51 python::object exceptionType()
const;
52 python::object exceptionValue()
const;
57 bool isTerminated()
const;