]> Dogcows Code - chaz/openbox/blobdiff - src/python.cc
let clients be remaximized to adjust to new surroundings/struts
[chaz/openbox] / src / python.cc
index 2a9a912a2b583bd457b9000bd99078a528bb92a6..28369e9a2e1e1d5d8b62d89f926b192369cb4ba1 100644 (file)
@@ -26,12 +26,12 @@ void python_init(char *argv0)
   // initialize the C python module
   init_otk();
   init_ob();
-  // include the openbox directories for python scripts in the sys path
+  // prepend the openbox directories for python scripts to the sys path
   PyRun_SimpleString("import sys");
-  PyRun_SimpleString(const_cast<char*>(("sys.path.append('" +
+  PyRun_SimpleString("sys.path.insert(0, '" SCRIPTDIR "')");
+  PyRun_SimpleString(const_cast<char*>(("sys.path.insert(0, '" +
                                         otk::expandTilde("~/.openbox/python") +
                                         "')").c_str()));
-  PyRun_SimpleString("sys.path.append('" SCRIPTDIR "')");
   PyRun_SimpleString("import ob; import otk; import config;");
   // set up convenience global variables
   PyRun_SimpleString("ob.openbox = ob.Openbox_instance()");
This page took 0.020625 seconds and 4 git commands to generate.