More generally, you can run this file directly to start a clock with or without arguments,
import and make its objects with configuration objects to get a more custom display,
or import and attach its objects to other GUIs. For instance, PyGadgets in Chap-
ter 10 runs this file with command-line options to tailor the display.
Example 11-12. PP4E\Gui\Clock\clock.py
"""
###############################################################################
PyClock 2.1: a clock GUI in Python/tkinter.
With both analog and digital display modes, a pop-up date label, clock face
images, general resizing, etc. May be run both standalone, or embedded
(attached) in other GUIs that need a clock.
New in 2.0: s/m keys set seconds/minutes timer for pop-up msg; window icon.
New in 2.1: updated to run under Python 3.X (2.X no longer supported)
###############################################################################
"""
from tkinter import *
from tkinter.simpledialog import askinteger
import math, time, sys
###############################################################################
Option configuration classes
###############################################################################
Figure 11-24. A few canned clock styles: clockstyles.py
PyClock: An Analog/Digital Clock Widget | 755