Chapter 16

Objects in Motion

This may sound complicated, but if you’re using VIM to begin with you obviously have a pathological lack of any fear of complexity.

—Alan Daniels


There are no figures for chapter 16.

Example Programs

There are several example programs, and some text files, for chapter 16:  download chapter16.zip.  The text files contain some test data.

Not all of the programs for this chapter were documented in the book.

  1. vcr.py
  2. vcrdump.py
  3. vcrepl.py
  4. vcrleft.py
  5. vcrlong.py
  6. vcrverify.py
  7. testvcr.txt
  8. VcrList95


Visit http://www.python.org/doc/current/lib/module-shelve.html to find out more about the shelve module.

The definitive book on regular expressions is by Jeffrey E.F. Friedl, Mastering Regular Expressions from O’Reilly (now in its second edition).

David Ascher said of this book, “Jeffrey Friedl’s book is IMO one of the few that I own that I think are worth the price, even though its Python knowledge is obsolete and I use regexps as sparingly as I possibly can.  If nothing else, it is proof that the human mind will delve obsessively into arcane knowledge for no other reason than because it can.”  High praise, indeed.

Add ranges to vcq.py.  Hint:  look at my getargs module, which can be found at Software, near the bottom of the page.  It’s fully documented, of course: see getargs.html.  When you add the ranges, send the changes to me, and I’ll give you a credit.

Valid HTML 4.01 Transitional