--- a/finch/libgnt/gntwm.c Thu Feb 13 20:22:10 2014 -0500 +++ b/finch/libgnt/gntwm.c Thu Feb 13 20:33:18 2014 -0500 @@ -1577,7 +1577,17 @@ gnt_bindable_class_register_action(GNT_BINDABLE_CLASS(klass), "run-python", run_python, GNT_KEY_F3, NULL); if (!Py_IsInitialized()) { +#if PY_MAJOR_VERSION >= 3 + wchar_t *name; + size_t len; + len = mbstowcs(NULL, "gnt", 0); + name = g_new(wchar_t, len + 1); + mbstowcs(name, "gnt", len + 1); + Py_SetProgramName(name); + g_free(name); +#else Py_SetProgramName("gnt"); +#endif Py_Initialize(); started_python = TRUE; }