summaryrefslogtreecommitdiff
path: root/src/caja-python.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-01-08 15:17:46 +0100
committerinfirit <[email protected]>2014-01-08 15:17:46 +0100
commit4c3aaf3ad0023204c8e09d02de150ca2a29e9e59 (patch)
treebb98c646ecfb4074ff789b2c265e3fbec405fffb /src/caja-python.c
parentb0dcf318701e517340aa7a491af8a8384df474a4 (diff)
downloadpython-caja-4c3aaf3ad0023204c8e09d02de150ca2a29e9e59.tar.bz2
python-caja-4c3aaf3ad0023204c8e09d02de150ca2a29e9e59.tar.xz
Revert "Do not dlopen libpython"
This reverts commit d63756bd11b097f11f115d5477110893b7ee16a2. Causes problems like the following issue on github: https://github.com/mate-desktop/python-caja/issues/5
Diffstat (limited to 'src/caja-python.c')
-rw-r--r--src/caja-python.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/caja-python.c b/src/caja-python.c
index 21e7f42..a6a7478 100644
--- a/src/caja-python.c
+++ b/src/caja-python.c
@@ -155,11 +155,17 @@ static gboolean
caja_python_init_python (void)
{
PyObject *caja;
+ GModule *libpython;
char *argv[] = { "caja", NULL };
if (Py_IsInitialized())
return TRUE;
+ debug("g_module_open " PY_LIB_LOC "/libpython" PYTHON_VERSION "." G_MODULE_SUFFIX ".1.0");
+ libpython = g_module_open(PY_LIB_LOC "/libpython" PYTHON_VERSION "." G_MODULE_SUFFIX ".1.0", 0);
+ if (!libpython)
+ g_warning("g_module_open libpython failed: %s", g_module_error());
+
debug("Py_Initialize");
Py_Initialize();
if (PyErr_Occurred())