Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: ef4364f3b8d45c713ca4aecf9329587ee0ed1bda authored by Neal Norwitz on 05 April 2007, 05:06:49 UTC
Fix unpack so it works on 64-bit platforms.
Tip revision: ef4364f
importexc.c
#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;
}
back to top