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

This commit is contained in:
Vincent Castellano 2015-05-07 01:54:17 -07:00
parent a30333b4ea
commit a301e83129

View File

@ -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");