L548: Computer Programming for
Information Management

School of Library and Information Science
Indiana University
Spring 2002

Instructor: Uta Priss
Email: upriss@indiana.edu
Office: 029 SLIS
Phone: 812-855-2793
Office hours: Tuesday 3.00 - 4.30 or by appointment

This syllabus is electronically available at http://php.indiana.edu/~upriss/python/548-Sp02-syllabus.html

Course Syllabus

Some class-related links:

Python documentation on Ella
Index of Python methods, symbols etc (this is a large file)
Student projects
A sample Python/CGI script for displaying a Postgres table
Final exam Answer to the first exam question


This course introduces basic skills for programming and manipulation of text-based information systems. Information management is a major task for information professionals who are asked to extract information from sources on the WWW, design interactive text-based web interfaces to information systems, utilize text that is stored or is supposed to be stored in a markup format or preprocess information for storage in databases. This course teaches computer-based approaches to these tasks.

Currently the class is taught using Python/CGI. Python provides a good introduction to general programming concepts. These concepts include basic programming structures, such as control structures, file handling and program design strategies. But they also include more advanced topics, such as networking, text-based user interfaces, and basic retrieval concepts. Python allows rapid prototyping which is appropriate for applications in a fast changing environment such as the WWW. Furthermore, Python is very suited for search engines, parsers and mark-up languages. Students will develop a small information systems application as a project for this class. The concepts are therefore not taught abstractly but as hands-on experiences with WWW applications.

Course Objectives

This course
  1. teaches basic programming concepts and structures.
  2. introduces basic information processing and management concepts.
  3. uses small scale but realistic examples of information management tasks.
  4. teaches the basics of Python and Python/CGI.
  5. provides an introduction to more advanced topics such as object oriented programming.


L401 (must be either completed in a prior semester or an approved waiver must be in the student's file).
For non-SLIS students: send an email message to upriss@indiana.edu in which you describe your computer skills related to Unix, HTML, HTML forms and general knowledge about the WWW.

Especially important for this class are: basic Unix skills, i.e. understanding of the Unix directory structure and ability to edit and save files on a Unix computer; ability to create HTML web forms.

Class Organization

The class is taught as a combination of lecture and lab sessions. The students will work on a semester team project. The results of the projects will be presented during the last class session.

Computer Lab

The lab session is taught in LI503 (a PC lab). All students must create an account on one of the IU Unix computers where Python is installed, such as Steel or Nations at least 24 hours before the first lab session.


The following book is highly recommended for this class:
  • Core Python Programming (Prentice Hall Ptr Core Series) by Wesley J. Chun. 1st edition (December 15, 2000) Prentice Hall PTR; ISBN: 0130260363; (Note: this book can be a lot cheaper at Amazon than at a bookstore!)

    The book is recommended but not required because there are many free on-line resources available which some students may prefer to a book:

  • General website on Python
  • An on-line tutorial


    The grades are given according to the SLIS grading standards. Good work that meets the course expectations will be assigned a grade of B. To get a higher grade than B, the students must demonstrate above average comprehension of the course materials, knowledge and/or effort.

    The final course grade will be computed for each student on the basis of grades assigned for the following:

    Class contribution and mailing list discussions 1/5
    Project 2/5
    Final exam 2/5

    Each student is expected to complete all course work by the end of the term. A grade of incomplete (I) will be assigned only if exceptional circumstances warrant. Late work will be accepted only at the discretion of the instructor and in every case will be automatically downgraded by 1/3 grade (e.g., a B+ becomes a B, a B- becomes a C+, etc.). Students are required to maintain backup copies of their work so that they will not loose their work due to computer failures.

    Class contribution and mailing list discussions

    The class contribution grade will be calculated based on class attendance and contributions to class discussions and discussions on the majordomo distribution list (upriss_l548@indiana.edu). It is required that every student demonstrate respect for the ideas, opinions, and feelings of all other members of the class.

    Projects: Teams and topics

    Students will work on their projects in a team of 3-4 members. The teams must be formed before the third week of class. Each project will consist of developing an information processing or information management tool. The tool must have a CGI-based user interface.

    Examples for projects are:

    Other similar topics can be suggested by the students. Some of these topics require additional knowledge (such as databases or xml) and should only be chosen by students who have acquired such knowledge prior to this class. The students should discuss their choice of topic with the instructor.

    Project presentation, assignments and final project report

    The students will present their tools during the last lab session (April 22/23, 2002). Parts of the projects (and its documentation) will be handed in as assignments during the semester (see the Class Schedule). The source code of the tool should not be included in the documentation but it must be made available for evaluation by the instructor.

    Grading of the projects

    A total of up to 70 points will be given for the project. Each of the four assignments is worth 10 points, the presentation is worth 10 points; and 20 points will be given for the project as a whole when it is finished.

    The project will be evaluated according to the following criteria:

    Final Exam

    The final exam will be a take-home exam consisting of several small information management tasks for which the students will write appropriate Python scripts. The exam will be distributed at the conclusion of the class on April 15 and will be due on April 29, 12.00 pm (Noon). Team work is not allowed for the final exam.

    A note on plagiarism

    The students must clearly indicate if they use materials from other sources, such as textbooks or Internet webpages. Full citation information must be given for such sources. Academic and personal misconduct by students in this class are defined and dealt with according to the procedures in the Code of Student Ethics.

    Class Schedule

    Note: the topics given in this schedule are fixed but I may still make some modifications during the semester to the order of the topics and the precise content covered in each week.

    Week 1. Programming basics - Jan 7

    Topics: Introduction to information processing tasks; simple Python programs; scalar variables
    1. Lab Exercises Answers (The links for the answers will be enabled each week after the second lab.)
    2. Readings (in "Core Python Programming"): 2.1, 2.2, 2.3, 2.5, 2.6, 2.7

    Week 2. Operators and if statements - Jan 14

    Topics: operators, if statements and debugging
    1. Lab Exercises Answers
    2. Find partners for your team project and start developing a plan for your information processing tool: what do you want to accomplish with the tool? Which components will your tool have? What are possible features and limits? Find a name for your software tool.
    3. Readings (in "Core Python Programming"): 3.1 - 3.1.4, 3.3, 3.4, 2.10, 2.11, 5.1, 5.2.1, 5.5.3, 6.1.1, 6.2, 6.3.1

    Week 3. Logical expressions and Objects - Jan 28

    Topics: Logical "and", "or", and "not", truth tables, objects
    1. Lab Exercises Answers
    2. Readings (in "Core Python Programming"): 2.4, 4.5.1, 4.5.3, 4.1, (optional: 4.5.2)

    Week 4. Program design and control structures - Feb 4

    Topics: Program design; flowcharts; control structures
    1. Lab Exercises Answers
    2. To be handed in by Feb 11: Email the name of your project and a short description to the discussion list.
      Draw flowcharts for components of your information processing tool and hand them in.
    3. Readings (in "Core Python Programming"): 2.12, 2.13, 8.1 - 8.4.2, 8.5, 8.5.1, 8.6, 8.9, (optional: 8.5.4)

    Week 5. Lists, Dictionaries and File handling - Feb 11

    Topics: Lists and dictionaries; file handling
    1. Lab Exercises Answers
    2. Readings (in "Core Python Programming"): 2.8, 6.1, 6.1.1, 6.10, 6.11.2, 6.13, 2.14, 9.3.1, 9.3.2 (optional: 2.9, 2.15)

    Week 6. CGI I - Feb 18

    Topics: HTML forms and how to process them with CGI
    1. Lab Exercises Answers
    2. Readings (in "Core Python Programming"): 19.1, 19.1.1, 19.1.2, 19.4.1 - 19.5.2

    Week 7. Regular expressions I - Feb 25

    Topics: Regular expressions
    1. Lab Exercises Answers
    2. To be handed in by Mar 4: Create forms for your project and email the URL of the form page (or the start page of your project if they are different) to upriss@indiana.edu.
    3. Readings (in "Core Python Programming") for this week and next week: 15.1, 15.2, 15.3, 15.3.1, 15.3.2

    Week 8. Regular expressions II - Mar 4

    Topics: Regular expressions; substitution, transliteration and split
    1. Lab Exercises Answers

    Week 9. CGI II - Mar 18

    Topics: Customizing CGI scripts; environment variables and security
    1. Lab Exercises Answers

    Week 10. Programming in the large - Mar 25

    Topics: Functions, modular program design, local and global variables
    1. Lab Exercises Answers Pseudocode
    2. Readings (in "Core Python Programming"): 11.1, 11.1.2, 11.2.1, 11.2.2, 11.3.1, 11.3.3, 11.5, 11.5.1, 11.5.2, 11.8, 11.8.1
    3. To be handed in by Apr 1: Write
      1) the main part of your project and
      2) a function that processes the form input for your project in a secure manner. Print the source code of these two and hand it in. To avoid wasting large amounts of paper, please, use double-sided printing.

    Week 11. CGI III - Apr 1

    Topics: Maintaining state, hidden text and cookies
    1. Lab Exercises Answers
    2. Readings (in "Core Python Programming"): 19.6, 19.6.3, 19.8

    Week 12. A Python networking client - Apr 8

    Topics: Retrieving and searching documents from the web via Python
    1. Lab Exercises Answers
    2. To be handed in by Apr 15: Create a three page user manual for your project. You should add these pages to your website. Print the pages and hand them in. To avoid wasting large amounts of paper, please, use double-sided printing.
    3. Readings (in "Core Python Programming"): 19.2, 19.2.3, 19.3

    Week 13 - Lecture. The object oriented paradigm - Apr 15

    Topics: Objects, classes, methods

    1. Exercises Answers
    2. Readings (in "Core Python Programming"): 2.17, 2.18
    Final exam is handed out

    Week 14. - Conclusion and Project Presentations - Apr 22/23

    Project presentations: Apr 22/23 (labs)

    Final exam is due: Apr 29