Python Class Program Template

Normally I would recommend placing global variables in a separate Python file and importing them. I would also separate the functions and classes into modules and packages. I am not recommending this because:

  1. Class projects are generally smaller that normal projects
  2. Multiple files are harder to keep track of (multiple files & multiple students)
  3. No version or content management system is used for the class

Talk to the instructor if you want to use more thant one file.

# =========================================================
# Program Name/Description
# =========================================================
# Name: ..................
# Date: mm/dd/yyyy
# =========================================================
#
# Description / Usage
#
# ..................................................
# ..................................................
# ..................................................
#
# =========================================================
#
# Change History
#
# May 26, 2017 Developer Name
#              original code completed
#
# =========================================================
# Note: If a VCS (like GIT) is used, some of the data
#       in this header would stored there. Pydoc could be
#       use to create documentation.
# =========================================================

# ---------------------------------------------------------
# --- import
# ---------------------------------------------------------

import sys

# --- What version of Python am I running?
# --- import the appropriate Python tk interface
# --- set a Python version flag

if sys.version_info.major == 3:
    import tkinter *
    ##import tkinter as tk
    py3 = True
else:
    import Tkinter *
    ##import Tkinter as tk
    py3 = False

# ---------------------------------------------------------
# --- global variables
# ---------------------------------------------------------

# ---------------------------------------------------------
# --- classes
# ---------------------------------------------------------

# ---------------------------------------------------------
# --- functions
# ---------------------------------------------------------

# ---------------------------------------------------------
# --- main
# ---------------------------------------------------------

if __name__ == '__main__':

    ..........................    
    ..........................
    ..........................
    ..........................