Introduction
Introduction to Python and its use in science
Launching Python
Installing Python on your computer
The Canopy window
The Interactive Python Pane
Interactive Python as a calculator
Python Modules
Python functions: a first look
Variables
Script files and programs
Importing Modules
Getting help: documentation in IPython
Programming is a detail-oriented activity
Exercises
Strings, Lists, Arrays, and Dictionaries
Strings
Lists
NumPy arrays
Dictionaries
Random numbers
Exercises
Input and Output
Keyboard input
Screen output
File input
File output
Exercises
Plotting
An interactive session with pyplot
Basic plotting
Logarithmic plots
More advanced graphical output
Exercises
Conditionals and Loops
Conditionals
Loops
List Comprehensions
Exercises
Functions
User-defined functions
Methods and attributes
Example: linear least squares fitting
Exercises
Curve Fitting
Using linear regression for fitting non-linear functions
Nonlinear fitting
Exercises
Numerical Routines: SciPy and NumPy
Special functions
Linear algebra
Solving non-linear equations
Solving ODEs
Discrete (fast) Fourier transforms
Exercises
Installing Python
Installing Python
Testing your installation of Python
IPython Notebooks
An interactive interface
Installing and launching an IPython notebook
Using an IPython Notebook
Running programs in an IPython Notebook
Annotating an IPython Notebook
Editing and rerunning a notebook
Quitting an IPython notebook
Working with an existing IPython notebook
Python Resources
Web resources
Books
Index