]> Dogcows Code - chaz/openbox/commitdiff
add some comments to the procedure
authorDana Jansens <danakj@orodu.net>
Fri, 10 Jan 2003 06:43:52 +0000 (06:43 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 10 Jan 2003 06:43:52 +0000 (06:43 +0000)
src/python.cc

index 9ea93b4d5b5c7d61d26fa4533c41ca9bc169edd6..cdb7d431dc8708ae32453b85d9b0a27caddc7697 100644 (file)
@@ -21,26 +21,24 @@ static PyObject *obdict = NULL;
 
 void python_init(char *argv0)
 {
+  // start the python engine
   Py_SetProgramName(argv0);
   Py_Initialize();
+  // initialize the C python modules
   init_otk();
   init_openbox();
+  // include the openbox directories for python scripts in the sys path
   PyRun_SimpleString("import sys");
   PyRun_SimpleString("sys.path.append('" SCRIPTDIR "')");
   PyRun_SimpleString(const_cast<char*>(((std::string)"sys.path.append('" +
                                         otk::expandTilde("~/.openbox/python") +
                                         "')").c_str()));
-//  PyRun_SimpleString("from _otk import *; from _openbox import *;");
+  // import the otk and openbox modules into the main namespace
   PyRun_SimpleString("from otk import *; from openbox import *;");
+  // set up convenience global variables
   PyRun_SimpleString("openbox = Openbox_instance()");
   PyRun_SimpleString("display = OBDisplay_display()");
 
-  /* XXX
-     sys.path.append('stuff')
-     install the .py wrappers, and include their path with this, then import em
-     and ~/.openbox/python/ !!
-  */
-  
   // set up access to the python global variables
   PyObject *obmodule = PyImport_AddModule("__main__");
   obdict = PyModule_GetDict(obmodule);
This page took 0.027403 seconds and 4 git commands to generate.