diff --git a/python-tg.c b/python-tg.c index b1977a4..131c754 100644 --- a/python-tg.c +++ b/python-tg.c @@ -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");