+static PyTypeObject ActionData_Type = {
+ PyObject_HEAD_INIT(NULL)
+ 0,
+ "ActionData",
+ sizeof(ActionData),
+ 0,
+ (destructor)ActionDataDealloc,
+ 0,
+ (getattrfunc)ActionDataGetAttr,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+};
+
+static PyTypeObject BindingData_Type = {
+ PyObject_HEAD_INIT(NULL)
+ 0,
+ "BindingData",
+ sizeof(BindingData),
+ 0,
+ (destructor)BindingDataDealloc,
+ 0,
+ (getattrfunc)BindingDataGetAttr,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+};
+
+// **************** //
+// End custom types //
+// **************** //
+
+void python_init(char *argv0)
+{
+ Py_SetProgramName(argv0);
+ Py_Initialize();
+ init_otk();
+ init_openbox();
+ PyRun_SimpleString("from _otk import *; from _openbox import *;");
+ PyRun_SimpleString("openbox = Openbox_instance()");
+
+ // set up access to the python global variables
+ PyObject *obmodule = PyImport_AddModule("__main__");
+ obdict = PyModule_GetDict(obmodule);
+
+ // set up the custom types
+ ActionData_Type.ob_type = &PyType_Type;
+ BindingData_Type.ob_type = &PyType_Type;
+}