diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-31 06:01:16 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-31 06:01:16 +0000 |
| commit | 3d8a035a9a230b729bc0c0c6ed6cee95169bd51e (patch) | |
| tree | 161afea6eaa49bb70447a4fec8491bbbf79c1e89 /src | |
| parent | 05aad313ee969cae900b587941f47673029f41ef (diff) | |
try appending our shit to the path, and not import config in the cc
Diffstat (limited to 'src')
| -rw-r--r-- | src/python.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/python.cc b/src/python.cc index 2a9a912a..2144ab4a 100644 --- a/src/python.cc +++ b/src/python.cc @@ -26,13 +26,13 @@ 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;"); + PyRun_SimpleString("import ob; import otk;");// import config;"); // set up convenience global variables PyRun_SimpleString("ob.openbox = ob.Openbox_instance()"); PyRun_SimpleString("otk.display = otk.Display_instance()"); |
