Home Search Download Documentation
Help Community SIGs Modules
 
Conference pages
Index
Proceedings
Program at a glance
Organizers
(Call for papers)
 
See also
Last year's proceedings
Previous conferences
 
Email us
ipc7@python.org

  

Seventh International Python Conference Papers

The conference program contains more information about when papers will be presented.

Applications I: The Internet Optimizing Python Extending and Compiling Applications II: Science and Simulation

Beyond:  A Portable Virtual World Simulation Framework
by Jason Asbahr

This paper presents a global survey of current work on a commercial system, the Beyond Simulation Framework. Research and development of world simulation control code for real-time 3D environments is described. General approach, motivations, architecture, benefits, and the lessons learned are described, as well as future direction for work in this area. The emphasis is that the dynamic scripting approach described here has merit applied to the construction of entertainment and educational virtual environments.

Converting Python Virtual Machine Code to C
by John Aycock
Department of Computer Science, University of Victoria, B.C., Canada

The optimization of a Python program has a limit point, beyond which a programmer must resort to C code in order to get more speed. Not all programmers are willing or able to take this step. 211 is an experimental program which automatically converts Python virtual machine code into C. In this paper I discuss 211, its results, and suggest changes to Python's internals which should yield better results and faster programs.

Compiling Little Languages in Python
by John Aycock
Department of Computer Science, University of Victoria, B.C., Canada

"Little languages" such as configuration files or HTML documents are commonplace in computing. This paper divides the work of implementing a little language into four parts, and presents a framework which can be used to easily conquer the implementation of each. The pieces of the framework have the unusual property that they may be extended through normal object-oriented means, allowing features to be added to a little language simply by subclassing parts of its compiler.

A Facility for Creating Python Extensions in C++
by Paul F. Dubois
Computer Science Project Leader, X-Division
Lawrence Livermore National Laboratory

Python extensions are usually created by writing the glue that connects Python to the desired new functionality in the C language. While simple extensions do not require much effort, to do the job correctly with full error checking is tedious and prone to errors in reference counting and to memory leaks, especially when errors occur. The resulting program is difficult to read and maintain. By designing suitable C++ classes to wrap the Python C API, we are able to produce extensions that are correct and which clean up after themselves correctly when errors occur. This facility also integrates the C++ and Python exception facilities.

This paper briefly describes our package for this purpose, named CXX. The emphasis is on our design choices and the way these contribute to the construction of accurate Python extensions. We also briefly relate the way CXX's facilities for sequence classes allow use of C++'s Standard Template Library (STL) algorithms on C++ sequences.

Python as a Discrete Event Simulation environment
by F. Oliver Gathmann
University of Toronto, Surface and Groundwater Ecology Research Group

This paper summarizes experiences made with using Python for implementing an interactive environment for Discrete Event Simulation of patchy animal populations. The main novel features of the system are runtime assembly of the simulation object sources allowing for easy integration of user-defined code, flexible monitoring of the simulation process using fast numerical arrays of variable dimensionality (based on the Numerical Python extension), and realtime multivariate analysis of the simulation results. 

Python Vuh: Mayan Calendrical Mathematics with Python
by Ivan Van Laningham
Callware Technologies, Inc.

The Mayan calendar is well suited to computer calculation, but existing programs are not extensible and are generally written in compiled languages, which limits their portability. Python is portable, extensible, and has built-in features that make processing dates in the Mayan calendarcreasonably straightforward. A basic introduction to the Mayan calendar is presented, followed by discussion of some of the problems encountered using conventional languages, and some alternative approaches using Python are given. The areas of computerized parsing and special class methods in Python are covered. A discussion of recovering dates from partial inscriptions follows, with highlights of a CGI program to allow users to enter such partial dates and receive a list of possible solutions. Future directions for Mayan calendrical research with Python are suggested. The conclusion suggests that archaeologists and epigraphers in the field could use Python to help them pin down otherwise indeterminate dates in the Mayan inscriptions.

Virtual Method Tables in Python
by Martin von Loewis
Humboldt-Universität zu Berlin

Virtual tables are a mechanism to find methods of a class efficiently. Typically, they are used for statically-typed languages. This paper discusses an implementation of this mechanism for Python. Different design choices are analyzed, and performance measurements are presented.

Mailman – An Extensible Mailing List Manager Using Python
by Ken Manheimer, Barry Warsaw,
CNRI
and John Viega
Reliable Software Technologies

The core role of email in explosive growth of the Internet and of new communities within it calls for ailing List Management Systems (MLMS) which can adapt to, and even foster, new forms of community organization as they emerge. A new MLMS, Mailman, is well suited to such evolution because it has been developed to be versatile and extensible. One factor contributing to these strengths is its implementation in Python. In this paper we will look at various aspects of Mailman’s extensibility. We will consider how the system’s design and how features of its implementation language, Python, factor into that extensibility.

Evolutionary Prototyping:  "Add Later" Static Types for Python
by Roger E. Masse
CNRI

This paper is concerned with the benefits of prototyping as a method of evolving software and clarifying requirements.   The Python type system, properties of type systems, and the aspects of “scripting” languages that lend themselves to rapid application development are reviewed, specifically dynamic typing. The benefits of static typing in “systems” programming languages and how end-products written in these languages can benefit from additional compile time checks, enhanced readability, and more efficient machine execution are also presented. Following an assertion that the Python language is well suited to prototyping tasks, an “add later” static type syntax for Python is introduced. This optional language feature would allow mature programs to acquire more conspicuous, well-understood type definitions and expand Python’s capabilities towards suitability as a “systems” language implementation.

A Python Based Production System for High Volume Electronic Publishing
by Sean Mc Grath
Digitome Electronic Publishing

The Official Record of the Proceedings of the Irish Parliament is a document collection spanning 76 years, 600 volumes and some 125 feet of shelf space. The project described in this paper involved capturing these volumes electronically in XML (eXtensible Markup Language)[1] and automatic conversion to a CD-ROM/Internet publishing product known as Folio Views. Folio Views[2] is a commercial text database/search and retrieval tool that is particularly popular in the government/ legal/financial publishing sectors. It has a full text search engine that is powerful and fast—par-ticularly for large document collections. A single Folio Views publication (known as an Infobase) can be up to 4 GB in size. To get data into Folio Views it must be converted to a tagged text format called Folio Flat File (FFF). FFF can be created directly from word processing docu-ments but it can also be generated from databases and structured text formats such as XML as discussed in this paper. All the software aspects of the electronic publishing process—from data capture quality assurance through to the final generation of a >2 GB Folio Views Info-base—are written in Python. This paper provides a brief overview of XML and illustrates how and why Python was used to build this production system. It presents an overview of a Python toolkit for XML processing known as LumberJack de-veloped by the authors[3]. It includes details of some of the techniques used to integrate Python programs as first class "documents" in the overall document hierarchy of the project. It also presents details of how Py-thon was used as a powerful document validation and reporting tool.

A Peephole Optimizer for Python
by Skip Montanaro
Automatrix, Inc.

This paper describes the implementation of a peep-hole optimizer for Python byte codes. Python's byte code compiler currently generates code that can easily be improved. The peephole optimizer implemented presented here implements a number of common optimizations, including jump chaining, constant expression evaluation and elimination of unnecessary loads. Some optimizations rely on specific properties of Python or its virtual machine. Some optimizations common to statically typed languages, such as algebraic simplication and expression rearrangement, are prevented by Python's dynamic typing. Preliminary results obtained using pybench[Lemb] suggest that the optimizer has a positive benefit for specific operations. With the current measurement tools available however, it is difficult to quantify benefits that can be derived by using the optimizer. Situations in which the benchmarks may not yield reliable results are considered. The limitations Python places on the optimizer are discussed, especially restrictions caused by the dynamic nature of the language. Other performance improvements to the Python interpreter are discussed brie y.

PyFront: Conversion of Python to C Extension Modules
by Jonathan Riehl
United Space Alliance

PyFront is a system for the conversion of Python modules into C extension modules. PyFront is related to the Paths static analysis tool for Python, but employs a higher fidelity data flow model. In building these higher fidelity models, PyFront bridges the gap between the interpreted Python language, and the compiled C language. The C extension modules generated by PyFront will provide faster execution times but identical results to the original Python source. PyFront has the potential to offer an intermediate, but automatic, step in the optimization of Python modules and routines.

Implementing the SMS server, or why I switched from Tcl to Python
by Frank Stajano
Olivetti-Oracle Research Laboratory &
University of Cambridge Computer Laboratory

The SMS server is a system that allows mobile users to access information on their fixed computer facilities through the short message facility of GSM cellphones. Writing a versatile and extensible SMS server in Python, with interfaces to the cellphone on one side and to the Internet on the other, has been an interesting and enjoyable experience. This paper examines some Python pro-gramming issues and techniques used in implementing the server and distils some experience-based insights about the relative strengths and weaknesses of this remarkable programming environment when compared to the author’s previous weapon of choice in the realm of scripting.