Python is a scripting (dynamically typed) language that is rapidly growing in popularity because it is exceptionally simple, fun to use, and powerful for a variety of applications. This short course provides an introduction to Python, with an emphasis on Internet applications. A semester of programming, or equivalent experience, is expected.
Application areas, selected in accord with the interests and abilities of the class, include possibilities such as:
Class time includes supervised individual and team program development, technical presentations, and project reports.
Instructor: Prof. Chris Haynes, chaynes@indiana.edu, office LH230F, office phone 855-3376, home phone 336-3221 (business hours only, please), office hours Monday 1-3:30 and by appointment. Don't hesitate to contact me if you have any questions or concerns.
Credit hours: 1.5
Schedule: Second eight weeks (beginning March 4th), TR 7:15P-8:25P in LH115
Bill Venners: In the introduction to your "Why I Love Python" keynote [at the 9th International Python Conference], you said what you love the most is "Python is about you." How is Python about you?
Bruce Eckel: With every other language I've had to deal with, it's always felt like the designers were saying, "Yes, we're trying to make your life easier with this language, but these other things are more important." With Python, it has always felt like the designers were saying, "We're trying to make your life easier, and that's it. Making your life easier is the thing that we're not compromising on."
—from an "artima development" interview
Each student maintains a portfolio of their work, including Python programs that they have developed or contributed to.
Maintain your portfolio as a directory that you have access to in class. A working copy of all or the active part of your portfolio may be maintained on a flash drive, but it must be backed up after every few hours of work to a professionally-maintained server. You may wish to use your Oncourse A290 site drop box for this purpose.
If you are actively working on a team project, shared project material may be maintained as a separate directory to which all team members have access. This should be indicated in team member's individual portfolios. Copies of the team's final work should be included in each team member's final portfolio submission. Team project materials must also be maintained on a professionally-maintained server. Oncourse and SVN sites for team work management are available on request.
Include in your portfolio a plain-text log with at least weekly entries noting progress, difficulties, and questions.
Email log entries for the last week to me every Sunday or Monday with "A290 Log" in the message subject and the log text in the body (not as an attachment).
Short individual assignments may be required, but most work can be done in approved teams. In team work, individual contributions are to be clearly noted in code comments, documentation, and log entries, as appropriate.
Who was responsible in whole or part for each file in your portfolio must be indicated by a comment in the first line of the file and/or by a README file in the file's, or a parent, directory. If different individuals independently contributed substantial portions of a file, indicate with conspicuous comments who was responsible for what portions.
You should be able to demonstrate reasonable understanding of any code that you claim to be responsible for (unless you have clearly indicated with comments that for some reason you do not understand a bit of code).
If you indicate responsiblity for code, but it is clear from your lack of understanding of the code or other evidence that you are not responsible for it, you may be charged with academic misconduct. See the department's Statement on Academic Integrity, and ask if you have any doubt of how it may apply to you.
Online documentation and tutorial material should suffice in most cases. No printed text or reference materials is required, though some may be recommended for individual use. Any software required for personal machine use is free.
The Python Beginner's Guide page is a great place to look for online tutorials and documentation appropriate to your interests and abilities.
The Python Tutorial by Guido van Rossum, included in the documentation distributed with Python, is often quite detailed. It can still be very good reading if you just note the sections that aren't of immediate interest and skip them.
There are lots of Python tradebooks you might find valuable. Python in a Nutshell, 2nd Ed. is current and one of the best, and Learning Python is an old favorite of mine.
Unfortunately there are few Python textbooks (with lots of exercises), and none that I can recommend highly. Zelle's Python Programming: An Introduction to Computer Science is perhaps the best all-round, though I suggest skipping the limited and non-standard graphics material in chapter 5.
A few pages prepared for this course:
Other links of particular interest:
CPython is the standard implementation of Python, freely available for all major (and several other) operating systems, and installed on LH115 machines. Its interpreter and some libraries are written in the C language.
Other implementations of Python that deserve consideration for some purposes include:
You may use whatever programming environment for Python development, but some are much more helpful than others. Of course a plain-text editor must be used: do not use a word processor. Some development environments to consider follow.
Like other powerful tools, Emacs and Eclipse have substantial learning curves. If you are already familiar with and like using either one, you will probably want to use it (unless perhaps if you are working with team members who don't use it). Otherwise, IDLE is recommended. All three are installed on LH115 machines and are free downloads.
Let me know if you prefer to use another environment.