PageRenderTime 284ms CodeModel.GetById 149ms app.highlight 1ms RepoModel.GetById 133ms app.codeStats 0ms

/Demo/embed/importexc.c

http://unladen-swallow.googlecode.com/
C | 17 lines | 13 code | 4 blank | 0 comment | 0 complexity | a3ef144e6b0689cafdae58d167e029c8 MD5 | raw file
 1#include <Python.h>
 2
 3char* cmd = "import exceptions";
 4
 5int main()
 6{
 7	Py_Initialize();
 8	PyEval_InitThreads();
 9	PyRun_SimpleString(cmd);
10	Py_EndInterpreter(PyThreadState_Get());
11
12	Py_NewInterpreter();
13	PyRun_SimpleString(cmd);
14	Py_Finalize();
15
16	return 0;
17}