2.3. Python scripts

If medit is built with Python support, then Python scripts have full access to the program internals via builtin moo module. medit classes extend classes from pygtk, in particular the moo.edit.Edit class representing documents extends the gtk.TextView class, and all editing operations can be implemented using pygtk API.

Python scripts executed from inside medit have LIBDIR/plugins/lib and USERDATADIR/plugins/lib directories added to sys.path, you can place there medit-specific modules to be used from python tools.

Python scripts have the following variables predefined: