diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-12-24 23:31:38 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-12-24 23:31:38 +0000 |
| commit | bf49e7642027f576716e5742544c282f4396f9ef (patch) | |
| tree | b5ea1942e661a35330ce19443b2b8fd6c33019ef /src/openbox.cc | |
| parent | 5a139f7263e33b499836f5df9ac37400e02c32f9 (diff) | |
python. no more guile. python.
Diffstat (limited to 'src/openbox.cc')
| -rw-r--r-- | src/openbox.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/openbox.cc b/src/openbox.cc index 2254f9ef..9078e6e1 100644 --- a/src/openbox.cc +++ b/src/openbox.cc @@ -44,10 +44,14 @@ extern "C" { //#include <guile/gh.h> +//extern void SWIG_init(); + #include <Python.h> // The initializer in openbox_wrap.cc extern void init_openbox(void); +// The initializer in otk_wrap.cc +extern void init_otk(void); #include "gettext.h" #define _(str) gettext(str) @@ -157,7 +161,7 @@ Openbox::Openbox(int argc, char **argv) ::exit(1); } - /* +/* // make our guile interfaces exist SWIG_init(); @@ -169,12 +173,14 @@ Openbox::Openbox(int argc, char **argv) fclose(rcpyfd); gh_load("/home/natas/.openbox/user.scm"); } - */ +*/ Py_SetProgramName(argv[0]); Py_Initialize(); - //initopenbox(); // initialize the static 'openbox' module + init_otk(); init_openbox(); + PyRun_String("from _otk import *; from _openbox import *;", Py_file_input, + PyEval_GetGlobals(), PyEval_GetGlobals()); FILE *rcpyfd = fopen("/home/natas/.openbox/user.py", "r"); if (!rcpyfd) { printf("failed to load python file /home/natas/.openbox/user.py\n"); |
