PyMOTW: difflib

The difflib module contains several classes for comparing sequences,
especially of lines of text from files, and manipulating the results.
The SequenceMatcher class compares any 2 sequences of values, as
long as the values are hash-able. It uses a recursive algorithm to
identify the longest contiguous matching blocks from the sequences,
eliminating “junk” values. The Differ class works on sequences of
text lines and produces human-readable deltas, including differences
within individual lines. The HtmlDiff class produces similar
results formatted as an HTML table.

Read more at difflib

PyMOTW: hmac

The HMAC algorithm can be used to verify the integrity of information
passed between applications or stored in a potentially vulnerable
location. The basic idea is to generate a cryptographic hash of the
actual data combined with a shared secret key. The resulting hash can
then be used to check the transmitted or stored message to determine a
level of trust, without transmitting the secret key.

Read more at hmac

PyMOTW: optparse

The optparse module is a modern alternative for command line
option parsing that offers several features not available in getopt,
including type conversion, option callbacks, and automatic help
generation. There are many more features for to optparse than can be
covered here, but hopefully this introduction will get you started if
you are writing a command line program soon.

Read more at optparse

PyMOTW: csv

The csv module is very useful for working with data exported from
spreadsheets and databases into text files. There is no well-defined
standard, so the csv module uses “dialects” to support parsing using
different parameters. Along with a generic reader and writer, the module
includes a dialect for working with Microsoft Excel.

Read more at csv