14

Chapter 14

The Laboratory of Dr. Frankenstein


Never Turn Something on if you Don’t Know How to Turn it Off.

—Advice Given to Farm Children
(Courtesy of Darryl Nelson)

Figures

Where does python live?
Figure 1.
Oops!
Figure 2.
A corrected fixhash.py
Figure 3.
Running fixhash.py on a tree
Figure 4.

Example Programs

There are several example programs for chapter 14:  download chapter14.zip.

  1. fixhash.1.py
  2. fixhash.2.py
  3. fixhash.3.py
  4. fixhash.4.py
  5. fixhash4.py
  6. fixhash.py
  7. testhash.py

Exercises

Visit the Apache Web site:   http://www.apache.org/

Use my Mayan calendar tools:  tools.html.

Search for modules and components at:   http://www.python.org and http://www.vex.net/parnassus/.  Both URLs implement excellent search engines.

If you haven’t already done so, join at least one of the mailing lists to be found at  http://www.python.org/psa/MailingLists.html.

After examining the rewritefile() function, you should have better ideas regarding the usefulness of stub functions.  What expanded information could you put into a rewritefile() function that would make it easier to develop or to debug?

Add case-insensitive comparison to the fixdirectory() function, but activate it only on Windows systems.  Hint:  check the documentation for the string module.

Find yourself a good archiving program, and stick with it.  I prefer WinZip, available at http://www.winzip.com/.  I use it even for distributing applications that are UNIX-only, instead of tar and gzip, because gzip can unpack WinZip archives and the files are smaller than gzip’s.


Valid HTML 4.01 Transitional