Next / Previous / Contents / TCC Help System / NM Tech homepage

6. Imports

This script uses a large number of standard Python modules. The sys and os modules are the standard system and operating system interfaces.

mazeratty
# - - - - -   I m p o r t s

import sys,os

Next we import the Tkinter graphical user interface construction kit; we also use the tkFileDialog module for the popup file dialog used to save the image. For documentation, see Tkinter 8.4 reference: A GUI for Python.

mazeratty
import Tkinter as tk
import tkFileDialog

We use the standard Python random module to generate random paths.

mazeratty
import random

We use the time module to create random seeds made from the current epoch time.

mazeratty
import time

We use the pexpect module to control a parallel process: the ps2pdf PostScript-to-PDF converter.

mazeratty
import pexpect

We use the tempfile module to generate a temporary file to hold PostScript output to be converted to PDF.

mazeratty
import tempfile