A brief tour of the packbox.py code starts
with lines 12-48 which define a helper function make_box() that
creates a horizontal box and populates it with buttons according to the
specified parameters. A reference to the horizontal box is returned.

Lines 55-239 define the PackBox1 class initialization method __init__()
that creates a window and a child veritcal box that is populated with a
different widget arrangement depending on the argument passed to it. If
a 1 is passed, lines 73-136 create a window displaying the five unique
packing arrangments that are available when varying the homogeneous, expand
and fill parameters. If a 2 is passed, lines 138-180 create a window displaying
the various combinations of fill with spacing and padding. Finally, if
a 3 is passed, lines 186-212 create a window displaying the use of the
pack_start()
method to left justfy the buttons and pack_end() method to right
justify a label. Lines 215-235 create a horizontal box containing a button
that is packed into the vertical box. The button "clicked" signal is connected
to the PyGTK mainquit() function to terminate the program.

Lines 248-250 check the command line arguments and exit the program
using the sys.exit() function if there isn't exactly one argument
Line 251 creates a PackBox1 instance. Line 252 invokes the main()
function to start the GTK event processing loop.

In this example program, the references to the various widgets (except
the window) are not saved in the object instance attributes because they
are not needed later.