Next / Previous / Contents / Shipman's homepage

4. fontselector: A small test driver

Here is a small Tkinter application that you can use to try out the FontSelect widget.

The driver starts with a prologue making it self-executing (under Unix), and a comment that points back to this documentation.

#!/usr/bin/env python
# fontselector: Test driver for FontSelect
# Do not edit this file directly.  It is mechanically extracted
# from the documentation:

import Tkinter as tk
import tkFont
import fontselect

4.1. The Application class

Next we start declaring the Application class, which embodies the entire graphical user interface.

class Application(tk.Frame):
    """GUI for fontselector

        .fontSelect:  [ self's FontSelect widget ]