diff options
Diffstat (limited to 'Demo/embed')
-rw-r--r-- | Demo/embed/import.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Demo/embed/import.c b/Demo/embed/import.c new file mode 100644 index 0000000..375ce1b --- /dev/null +++ b/Demo/embed/import.c @@ -0,0 +1,17 @@ +#include <Python.h> + +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; +} |