Copyright 1997-1998 by Corporation for National Research Initiatives. See the file LICENSE for details. This directory contains t1python, a Python extension which provides access to Rainer Menzner's t1lib. Requirements ------------ This package requires Python 1.5.1 to build. Python 1.5.1 is publicly available at http://www.python.org/. The Python Imaging Library (PIL) is supported without special consideration. This version has been tested with PIL 0.3a4 and Tk 8.0p2. Older versions of these libraries may not work correctly with this version of t1python. Building -------- 1. Build the base t1lib package. Be sure to following the instructions in the documentation regarding the configuration files. ./configure make make install Once the t1lib library has been built, follow the installation instructions in the t1lib manual. Read the section "Runtime-Setup". Follow the instructions. 2. Change to the python directory and build the extension: cd t1python/ make The make first retrieves the Makefile.pre.in from the installed Python sources and does a "boot" using that makefile, and then builds the extension. 3. Install the extension: make install Integration with the Python Imaging Library ------------------------------------------- The t1python package supports the Python Imaging Library. See the module t1Imaging for details. PIL and Tk (and the integration code from the PIL distribution) are required for the t1python demo program in tkdemo.py. One important note when building the Tk integration of PIL: the most recent release of PIL at this time, 0.3a3, requires a small patch to work with the most recent version of Tk (8.0p2). Specifically, in the file Tk/tkImaging.c from the PIL distribution, the call to Tk_FindPhoto() in the PyImagingPhoto() function requires a change, since the Tk API changed (yes, in a patch release!). Change: photo = Tk_FindPhoto(argv[1]); to: photo = Tk_FindPhoto(interp, argv[1]); then follow the instructions in the PIL distribution for building Python's _tkinter extension with PIL support. Future versions of PIL should not require this modification. Copyright --------- The copyright and license statement is included in the file LICENSE in the same directory as this file. This is based on the Python license, so it should be fine if you're using Python. Documentation ------------- The Python modules, t1lib and t1Imaging, include docstrings. I've tried to make these informative and complete. Please provide feedback on these as well as on the design and implementation. There is a simple example program in the file tkdemo.py. This demo requires that you have the Python Imaging Library (PIL) and Tk built & installed, and that the _tkinter module was built with PIL integration built in. Discussion Forum ---------------- Discussion of this package should be sent to the Python Image-SIG mailing list. For information on Python SIGs, see the Python Software Activity web site: http://www.python.org/sigs/ Note that queries specific to the Python interface to t1lib should *not* be directed to the author of t1lib, but should go to the Python Image-SIG or to myself; see below for contact information. Author's address ---------------- Fred L. Drake, Jr. Corporation for National Research Initiatives 1895 Preston White Dr. Reston, VA 20191-5434 USA Email: fdrake@acm.org