Python is a scripting language, a bit like matlab. You can find detailed information
at the main Python Website, or a summary in the
python section of Frank Warmerdam's course notes.
Python Bindings
Python bindings wrap c-code into modules that can be imported by python:
- pygtk (_gtkmodule.so/gtk.py under OpenEV/lib/python2.1/site-packages on
Linux/Unix) provides python bindings to gtk functions. _gtkmodule.so contains
the binary functions; gtk.py wraps them in a friendlier interface. For more, see the
PyGTK Website.
- OpenEV's python bindings are provided by _gvmodule.so and _gtkmissing.so,
and wrapped in gview.py, gvviewwindow.py (among others). Some of OpenEV's bindings
are generated using the the python script mkgv.py and a text file
specifying a little information about each function (gv.defs). This is based
on pygtk's method of generating bindings; the mkgv.py script
calls pygtk's "generate.py" module with a few arguments. The output
of mkgv.py is two files, gvmodule_defs.c and gvmodule_impl.c, that contain the
code for the bindings. Some of the functions are too
complicated to have automatically generated bindings; these are in gvmodule.c.
These three files are compiled and their object files included in _gvmodule.so.
A more detailed description of python bindings and an example are given in the
Python Binding section of Frank's course notes.
Next
Developer Course Outline
OpenEV Help