Remove commented out code in gncmod-python.c

This commit is contained in:
Richard Cohen 2023-03-29 11:01:00 +01:00
parent ecdd9dea50
commit 735a611361

View File

@ -57,39 +57,15 @@ libgncmod_python_gnc_module_description(void)
return g_strdup("An embedded Python interpreter"); return g_strdup("An embedded Python interpreter");
} }
//extern PyObject* PyInit__sw_app_utils(void);
//extern PyObject* PyInit__sw_core_utils(void);
int int
libgncmod_python_gnc_module_init(int refcount) libgncmod_python_gnc_module_init(int refcount)
{ {
/* There isn't yet a python module to init.
PyObject *pName, *pModule;
*/
FILE *fp; FILE *fp;
gchar *pkgdatadir, *init_filename; gchar *pkgdatadir, *init_filename;
wchar_t* argv = NULL; wchar_t* argv = NULL;
Py_Initialize(); Py_Initialize();
PySys_SetArgv(0, &argv); PySys_SetArgv(0, &argv);
// I don't quite understand why these are loaded here
// - these are python modules so should be able to just import them
// in init.py
//PyInit__sw_app_utils();
//PyInit__sw_core_utils();
/* There isn't yet a python module to init.
pName = PyString_FromString("path/to/init.py");
pModule = PyImport_Import(pName);
if (!pModule) {
PyErr_Print();
return FALSE;
}
Py_DECREF(pName);
Py_DECREF(pModule);
*/
pkgdatadir = gnc_path_get_pkgdatadir(); pkgdatadir = gnc_path_get_pkgdatadir();
init_filename = g_build_filename(pkgdatadir, "python/init.py", (char*)NULL); init_filename = g_build_filename(pkgdatadir, "python/init.py", (char*)NULL);