From ece153cd08f8ee00faf81373bb8fc60a06d62608 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 30 Jul 2013 23:42:46 +0100 Subject: [PATCH] Set path for plugins --- src/api/api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/api.c b/src/api/api.c index 8fa18afd..e1db3c0f 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -48,6 +48,7 @@ api_init(void) PyObject *pName, *pModule, *pProfInit, *pProfOnStart, *pArgs; Py_Initialize(); + PySys_SetPath("$PYTHONPATH:./plugins/"); Py_InitModule("prof", apiMethods); pName = PyString_FromString("helloworld"); pModule = PyImport_Import(pName); @@ -58,7 +59,7 @@ api_init(void) if (pProfInit && PyCallable_Check(pProfInit)) { pArgs = Py_BuildValue("ss", PACKAGE_VERSION, PACKAGE_STATUS); PyObject_CallObject(pProfInit, pArgs); -// Py_XDECREF(pArgs); + Py_XDECREF(pArgs); } Py_XDECREF(pProfInit);