support a path to the python script. TODO: get rid of gcc warn
This commit is contained in:
parent
a30333b4ea
commit
a301e83129
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user