Python has the full monty

Programs written in Python can be five times shorter than equivalent Java programs, writes Nick Langley

Programs written in Python can be five times shorter than equivalent Java programs, writes Nick Langley

What is it?

Python is an interpreted, interactive, object-oriented programming language, which can be downloaded and used for free. It is most frequently compared with rival open source scripting language Perl. But Python enthusiasts say it can be used in place of Java or C++.

Where did it originate?

Python was created in 1990 by Guido van Rossum. He had previously worked on a scripting language called ABC, which was intended to introduce computer concepts to beginners. Van Rossum reworked ABC with elements of Modula, Lisp and Smalltalk, and added an interpreter written in C.

What is it for?

Like Perl, Python is ideal for prototype development, and for use as scripting language to make diverse components work together. Proponents would reverse this, saying Python is a good general-purpose language which is also good for prototyping. They claim it handles large object-oriented programming tasks more easily than C++ or Java and scales well.

What makes it special?

Where Perl is said to be ideal for individual developers engaged in one-off projects, Python is more suitable for teams who need to read and incorporate one another's output. Its plain syntax makes it cheap and easy to maintain. The Python approach encourages modularity and code reuse.

Van Rossum says that, while Python programs run more slowly than Java, they tend to be three to five times shorter than equivalent Java programs, and much quicker to develop. He recommends using Java and Python together.

Prototypes can be developed in Python then converted to Java components and glued into applications using Python. Similarly, van Rossum says C++ developments can take one tenth of the time with Python.

How difficult is it?

Python was developed as a teaching language for non-techies, and is aimed at occasional users, although it fully supports advanced full-time developers.

Where is it used?

It is hard to keep track of open source products, and there is inevitably a great deal of unauthorised use in businesses. Backers include Hewlett Packard and AT&T Research Labs. George Lucas' film special effects company Industrial Light and Magic is a big user.

What does it run on?

Unix and Linux; Dos, Windows and OS/2; and Macintosh (Python was developed on a Mac). See www.comp.lang.python to find out if a compiler is available. There is also JPython, a version of Python that runs on the Java Virtual Machine.

Few people know that

The word python comes from the Greek pythein, to rot. The related word, pythogenic, means "produced by filth". We expect this word to enter the vocabulary of the highly-partisan Perl community.

What's coming up?

Van Rossum wants to apply the Python approach to learning and using other languages.

Rates of pay

Thanks to its roots as a Unix scripting language, Python often turns up as a "would be an advantage" for C++ programmers. Pure Python developer jobs are more rare, but can pay equally well. Look for £35,000 to £40,000 upwards.


There are plenty of introductions and tutorials and a wealth of documentation and downloads at www.python. org. If you want something on paper, try the open source community's house publisher O'Reilly & Associates at www.

Read more on Data centre hardware