Introduction to Python, Fall 2003
Course Notes
Some External Python Links
Documentation for the IDLE development environment (highly recommended for Windows users)
Creating Executable Programs from Python scripts
A Humourous Morality Tale about Python
Perl vs. Python (from the Perl website)
What's wrong with Perl (from a Python point of view)
A Brief Review of 8 Python books
Third-Party Modules and other resources for Python
Win32 extension modules for Python
Scripting the Web with Python (Guido van Rossum)
A CGI Framework in Python
How to Think Like a Computer Scientist: Python Edition
Assignments
The first "assignment" is to email me at
spector@stat.berkeley.edu, to introduce yourself and give me a brief description of
what you hope to learn in this course. If you can provide me with an example of the kind
of work you hope to be doing with Python, it would be very helpful to me.
There will be two projects for the course - one will be due the last week in November, and the
other 2 weeks after the course ends (December 24). The idea of the assignments is to give you
an opportunity to use Python to solve a problem that it of interest to you.
Assignment 2 - Due November 26
Write a Python program that opens a file, pipe or URL, and processes each line.
You are strongly encouraged to use input which is interesting to you, and/or useful
in your work, and to explore some of the modules which are available with Python.
If you can't think of an idea of your own, here are some possibilities:
- Count the number of lines, words and characters in a file.
- Count the number of times each word of a file appears in that file.
- Extract the current weather report from a website.
- Read an operating system command from a pipe to find the largest file in
a directory
Final Assignment - Due December 24
For the final assignment, submit a Python program which you have developed
to solve a problem at your job. If you've made substantial changes to the
program you wrote for the first assignment, the updated program would be
acceptable for the final assignment. Another possibility, if you have
access to a web server, is to write a CGI script in Python.
If you're unclear about the suitability of a program, or you'd like some
suggestions, feel free to email me.
Phil Spector
Last modified: Wed Nov 12 16:09:46 PST 2003