--- a/finch/libgnt/gntwm.c Thu Feb 13 18:01:36 2014 +0100 +++ b/finch/libgnt/gntwm.c Thu Feb 13 20:16:25 2014 -0500 @@ -1281,7 +1281,12 @@ { char *dir = g_path_get_dirname(path); FILE *file = fopen(path, "r"); - PyObject *pp = PySys_GetObject("path"), *dirobj = PyString_FromString(dir); + PyObject *pp = PySys_GetObject("path"); +#if PY_MAJOR_VERSION >= 3 + PyObject *dirobj = PyUnicode_FromString(dir); +#else + PyObject *dirobj = PyString_FromString(dir); +#endif PyList_Insert(pp, 0, dirobj); Py_DECREF(dirobj);