I l@ve RuBoard Previous Section Next Section

A.2 Python Software

A.2.1 The Standard Python Distribution

The most essential piece of Python software is clearly the Python interpreter itself. It's available in many formats for a variety of platforms. We defer discussion of the platform-specific issues until Appendix B. In general, the most reliable way to get an up-to-date distribution is to download it from the main Python web site (http://www.python.org). The Python web site is maintained by volunteers from the Python Software Association (see the next sidebar, The Python Software Association (PSA) and the Python Consortium), a group dedicated to the long-term success of Python. If you'd rather get Python binaries on a CD, Walnut Creek has a Python CD-ROM available that includes binaries for all common platforms (Windows, Macs, many versions of Unix, BeOS, and VMS). The URL for the last distribution available at time of writing is http://www.cdrom.com/titles/prog/python.htm, but check the Walnut Creek catalog for eventual newer releases. As described in Appendix B, most Linux distributions include Python. Both Programming Python and Internet Programming with Python (see Section A.3.3) also come with CDs that include Python distributions.

The standard distribution comes with hundreds of modules, both in C and Python. These modules are all officially supported by Guido and his crew (unless otherwise noted; when replaced by newer tools, old modules are kept for a few years to give users time to upgrade their software, and support for them decreases gradually). The interpreter, the standard library, and the standard documentation constitute the minimum set of tools a Python user has access to.

In addition to the standard distribution, there are hundreds of packages and modules available on the Web, most of which are free. We'll mention a few specifically and where to get them.

The Python Software Association (PSA) and the Python Consortium

While Guido van Rossum is Python's primary creator, he has been getting some help in recent years, especially when it comes to the various public-relations aspect of the Python language. The Python Software Association is an association of companies and individuals who wish to help preserve Python's existence as a free, evolving, well-supported language. PSA volunteers help run the python.org web site, organize the Python conferences, and collect membership dues from PSA members to help underwrite the costs of the web site, conferences, and other Python-related events. If you or your company are interested in joining the PSA, visit the PSA's web site at: http://www.python.org/psa/.

One perk of a PSA membership is that it entitles you to a free account on the "Starship Python," a web site run by a grateful Python user, Christian Tismer, as a public service to the Python community. The starship's current URL is http://starship.skyport.net, but it will soon move to http://starship.python.net.

The Python Consortium is a recent development that holds promise for long- term support of Python's development. CNRI (Guido van Rossum's current employer) is proposing to host a consortium of companies that would support, through membership dues, the development of the Python and JPython development environments. More information about the Python Consortium is available at http://www.python.org/consortium/.

A.2.2 Gifts from Guido

As if Python and its standard libraries weren't enough, Guido ships a few other programs as part of the standard distribution. They are located in the Tools directory of the Python source tree (or the Python installation directory on Windows and Mac).

In this set, as of Python 1.5.2, there is a first cut at an integrated development environment for Python, called idle. As Figure A.2 shows, it's a GUI based on top of Tkinter, so it requires that you have Tk/Tcl installed. idle is still in its infancy, but already provides quite a few nice features that make it ideal for the Python novice uses to friendly development environments:

Figure A.2. The idle IDE in action
figs/lpy_AA02.gif

A.2.3 Offerings from Commercial Vendors

We mention a few commercial software companies in this section. While this might seem at odds with a language that's usually "free," there is no contradiction in the Python community to having Python-based projects and "business models." Python's license is specifically crafted so that software vendors can use Python with no restrictions. Most Python users are glad to hear that companies are building successful companies based on Python. There are quite a few Python-related success stories that executives more or less freely disclose.[A] We mention only the companies that distribute code specifically aimed at Python programmers, not companies whose products include Python.

[A] Guido van Rossum is sometimes frustrated to hear companies say, off the record, that they use Python, but that they don't want it known publicly because they view their decision to use Python as a "strategic advantage."


A.2.3.1 Scriptics Corporation's Tcl/Tk toolkits

The Tkinter GUI framework we've referred to throughout the text is built on top of the Tk GUI toolkit, which itself uses the Tcl language. These are available in binary and source form from the web site of the Scriptics Corporation: http://www.scriptics.com/. For information about Tkinter-related resources, consult the Tkinter topic guide at http://www.python.org/topics/tkinter/.

A.2.3.2 Digital Creation's free releases

Digital Creation is a software company that has recently shifted from selling Python-based software packages to distributing them for free under the Open Source license. They have made several significant contributions to the Python community, by contributing to the standard distribution (they are responsible for the cPickle and cStringIO modules, for example), by helping the Python Software Association grow in many ways, and by distributing at no cost two very powerful Python tools. These are:

ExtensionClass

A C extension module that allows the creation of extension types that can act as Python classes. In addition, ExtensionClasses allow you to modify the way these new types work, including support for Acquisition. Acquisition is a mechanism by which objects can get attributes from the objects that they are a part of, much like instances can get attributes from their class or from their class' base classes.

Zope

A framework for publishing Python object hierarchies on the Web. With Zope, it's easy to set up a powerful interface to a database of Python objects. There are several extensions to Zope that allow scaling of web-based applications, by providing support for templates, interfaces to database engines, etc. If you're thinking about developing sophisticated web applications (as opposed to simple forms processing as we showed in Chapter 10), you should seriously investigate these tools.

Digital Creations' web site is at http://www.digicool.com; their free tools are available at http://www.digicool.com/site/Free/, and Zope is available at http://www.zope.org.

A.2.3.3 Pythonware

Pythonware is a Swedish Python toolsmith company, with several projects currently in development, including an Integrated Development Environment for Python, a lightweight replacement for Tk for Windows platforms, and an image processing framework. The reason we mention what is still "vaporware" is that the folks at Pythonware have already released other tools for free that have shown themselves to be quite useful, suggesting that these products will be worth the wait. Most important among their free releases is the Python Imaging Library (PIL), which we mentioned in Chapter 10, and the most comprehensive documentation for Tkinter anywhere. For PIL and other Pythonware tools, look at their web site, http://www.pythonware.com.

A.2.4 Other Modules and Packages

There are many other modules and packages available on the Web. These can be found in many locations:

A few of the tools that can be found in these three directories deserve special mention, because they have been found remarkably useful. These are:

Gadfly

An SQL database engine written entirely in Python by Aaron Watters. While its speed is not that of a high-performance commercial software vendor's database engine, its speed compares well to Microsoft's Access. Gadfly is at http://www.chordate.com/gadfly.html.

Medusa

A high-performance Internet server framework also written entirely in Python, this time by Sam Rushing. By using a multiplexing I/O single-process server, it offers high-performance for HTTP, FTP, and other IP services. While only free for noncommercial use, commercial licenses are quite inexpensive. Medusa is at http://www.nightmare.com/medusa/.

If you're looking for tools to use to teach programming with Python, two tools to consider are:

turtle.py

A Python module written by Guido van Rossum, and part of the standard Python library as of Python 1.5.2. This module provides simple "turtle graphics" in a Tk window. Turtle graphics have been used extensively to teach programming to children using the Logo language.

Alice

A program designed to allow nonexperts to explore interactive 3-D graphics. It was developed originally by a group at the University of Virginia, but is now under the auspices of the computer science department at Carnegie-Mellon University. See http://alice.cs.cmu.edu/.

A.2.5 Emacs Support

While this is not truly Python software, there is very good support for editing Python code from within the Emacs editor (on all platforms for which Emacs is available). From within Emacs, you can edit syntax-colored Python code, browse the functions, classes, and methods within a buffer, and run a Python interpreter or the Pdb python debugger, all within one of the most popular and powerful editors available. Information on Python support in Emacs can be found at http://www.python.org/emacs/.

I l@ve RuBoard Previous Section Next Section