diff --git a/Demo/embed/import.c b/Demo/embed/import.c new file mode 100644 index 00000000000..375ce1b6869 --- /dev/null +++ b/Demo/embed/import.c @@ -0,0 +1,17 @@ +#include + +char* cmd = "import exceptions"; + +int main() +{ + Py_Initialize(); + PyEval_InitThreads(); + PyRun_SimpleString(cmd); + Py_EndInterpreter(PyThreadState_Get()); + + Py_NewInterpreter(); + PyRun_SimpleString(cmd); + Py_Finalize(); + + return 0; +}