/* List of methods defined in the module */ static struct PyMethodDef $abbrev$_methods[] = { $methodlist$ {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */ }; static char $name$_module_documentation[] = "" ; #ifndef PyMODINIT_FUNC /* declarations for DLL import/export */ #define PyMODINIT_FUNC void #endif PyMODINIT_FUNC init$name$(void) { PyObject *m; $ready_types$ /* Create the module and add the functions */ m = Py_InitModule3("$name$", $abbrev$_methods, $name$_module_documentation); if (m == NULL) return; /* Add some symbolic constants to the module */ ErrorObject = PyString_FromString("$name$.error"); if (PyModule_AddObject(m, "error", ErrorObject) < 0) return; $add_types$ /* XXXX Add constants here */ }