summaryrefslogtreecommitdiffstats
path: root/Demo
diff options
context:
space:
mode:
Diffstat (limited to 'Demo')
-rw-r--r--Demo/embed/importexc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Demo/embed/importexc.c b/Demo/embed/importexc.c
index 375ce1b..59b1d01 100644
--- a/Demo/embed/importexc.c
+++ b/Demo/embed/importexc.c
@@ -1,14 +1,20 @@
#include <Python.h>
-char* cmd = "import exceptions";
+#if 0
+char* cmd = "import codecs, encodings.utf_8, types; print(types)";
+#else
+char* cmd = "import types; print(types)";
+#endif
int main()
{
+ printf("Initialize interpreter\n");
Py_Initialize();
PyEval_InitThreads();
PyRun_SimpleString(cmd);
Py_EndInterpreter(PyThreadState_Get());
+ printf("\nInitialize subinterpreter\n");
Py_NewInterpreter();
PyRun_SimpleString(cmd);
Py_Finalize();