The definitive Python reference is Programming
Python [Lutz]. Extensive
on-line documentation on Python extensions is also available at the
Python website.
In Chapter11 we
examined the
fetchmail/fetchmailconf
pair as an example of one way to separate implementation from
interface. Python's strengths are well illustrated by
fetchmailconf.
fetchmailconf uses the Tk
toolkit to implement a multi-panel GUI configuration editor (Python
bindings also exist for GTK+ and other toolkits, but Tk bindings ship
with every Python interpreter).
In expert mode, the GUI supports editing of about sixty
attributes divided among three panel levels. Attribute widgets include
a mix of checkboxes, radio buttons, text fields, and scrolling
listboxes. Despite this complexity, the first fully-functional version
of the configurator took me less than a week to design and code,
counting the four days it took to learn Python and Tk.