Commit a301e831 authored by Vincent Castellano's avatar Vincent Castellano

support a path to the python script. TODO: get rid of gcc warn

parent a30333b4
......@@ -1320,7 +1320,7 @@ void py_init (const char *file) {
char* dot = strrchr(file, '.');
if (dot && strcmp(dot, ".py") == 0)
*dot = 0;
pModule = PyImport_Import(PyString_FromString(file));
pModule = PyImport_Import(PyString_FromString(basename(file)));
if(pModule == NULL || PyErr_Occurred()) { // Error loading script
logprintf("Failed to load python script\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment