Next / Previous / Contents / Shipman's homepage

5. fontselect.py: The module

Here we begin the literate exposition of the actual code. First is a prologue directing the reader back to this documentation.

fontselect.py
"""fontselect.py: FontSelect, a font selector widget for Tkinter.

  Do not edit this file directly.  It is mechanically extracted
  from the documentation:
    http://www.nmt.edu/~shipman/soft/fontselect/
"""

5.1. Imported modules

fontselect.py
# - - - - -   I m p o r t s

The Tkinter module is imported using the shorter name tk.

fontselect.py
import Tkinter as tk

The tkFont module provides font-related functions.

fontselect.py
import tkFont

The Dialog module provides facilities for popup dialog boxes.

fontselect.py
import Dialog

We also use a ScrolledList widget, described elsewhere, to hold the list of families and its associated scrollbar. See ScrolledList: A Tkinter scrollable list widget.

fontselect.py
import scrolledlist