Department of Engineering

IT Services

An introduction to Python

Python is an interpreted, interactive, object-oriented programming language. It's free, expandable, portable and "easy". It's been around since 1991 - see the Computer Languages Timeline. It's on Macs and Linux as part of the system. It's used in schools to teach computing, and is increasingly used in universities (CompScis like its design). It's also used commercially. See the advocacy and pythonology pages for points in its favour, and see the list of Organizations using Python.

Comparisons

Python is often compared to Tcl, Perl, Scheme or Java. Here's a short Python by Example document for people already familiar with similar languages.

What's bad about the other languages? See quotes from 'Coders at Work' for comments about C++.

For a comparison with other languages regarding speed, see the julia document

Integration

Python is sometimes used within the university as an easy "glue" language to integrate various number-crunching processes. If you have C++ and fortran code you can create a wrapper for it in an automated fashion so that you can call it from Python.

What's next - programs and documentation

It's installed on our system (python version 2.6.6, at least). Documentation includes

Note that Python 3 is out now. This is incompatible with Python 2, so books and add-ons are all having to be re-written!

We've installed

  • a Python tutorial for beginners
  • idle - a program to make writing Python programs easier.

To start a session click on the appsicon icon at the top of the central system's linux terminals' screen and look in "CUED other start scripts" for "Start Python".

The university is keen on Python on the grounds that it is easy to use, well designed, and rich in packages (add-ons). See their list of Python training courses.

Further Information

See the Python homepage