Learning Python

From David Darts Wiki

Jump to: navigation, search

Python is a general-purpose high-level programming language whose design philosophy emphasizes code readability. It is free open source software and is managed by the non-profit Python Software Foundation.

There are a number of great free resources for learning Python. For example, the Google Python Class over at Google Code provides written materials, videos, code exercises etc. You can also check out Sed A. Shaw's Learning Python the Hard Way (free pdf download) which is designed for beginners.

Also check out Al Sweigart's Invent Your Own Computer Games with Python which is a free book that teaches you how to program simple games in the Python programming language. Al has generously shared the text online under a Creative Commons BY-NC-SA 3.0 license.

Ubuntu Lucid comes pre-installed with Python 2.6.5 though Al's book assumes users will have version 3.X. Fortunately, you can install Python 3.1 via the Ubuntu repositories. Be sure to keep 2.6.5 installed as many applications are dependent upon it - the two versions can happily co-exist on one Ubuntu system.

To install Python 3.1, simply go to System > Administration > Synaptic Package Manager and search for python3.1. Mark this package for installation, hit "Apply" and let Synaptic do its magic.

Keep in mind that you will need to open your Python programs in the terminal using:

python3.1 name_of_program.py
Personal tools