Home

Quick Start

Data

Python

Courseware

Lecture Graphics

Problems

Solutions

Bibliography


Python Links

Python Home

python.org

Basic install

Graphics

Learning Python

 

Overview

After you have done a basic Python installation, you should start up the Python interpreter and start working through a Python language tutorial. On Mac or Linux you can do this by opening a terminal window (either plain or x11 on Mac) and simply typing the command python at the prompt. For more convenience, if you have idle installed, you can type the command idle instead, and you'll get a nicer interpreter window that auto-indents, allows you to edit several lines at a time, and colorizes according to Python grammar. You can also open an editor window, which allows you to write, edit, save and run your scripts. If you are logging in to a server to run Python, you need to be logged in from an xterm (using ssh -Y or maybe ssh -X) in order to use idle or any other thing that puts up graphics. On a Mac or on Windows, you can start up idle by double-clicking the idle icon, but Python may have some trouble finding the courseware modules when you start using them, depending on exactly where these modules were put; also, Python may not be able to display graphics that rely on the x11 windowing system. More information on writing and running scripts can be found in the tutorials linked below.

Resources for learning Python

 

Example scripts

[**These just illustrate basic Python syntax and use of numpy. For example scripts illustrating use of the courseware, see the Courseware page. ]