API to many different secure hash and message digest algorithms
hmac[c]
Keyed-hashing for message authentication
md5[d]
RSA's MD5 message digest authentication
rotor
Provides multi-platform en/decryption services
sha[d]
NIST's secure hash algorithm SHA
stringprep[e]
Prepares Unicode strings for use in Internet protocols
textwrap[e]
Text-wrapping and filling
unicodedata
Unicode database
[a] New in Python 2.1.
[b] New in Python 2.5.
[c] New in Python 2.2.
[d] Obsoleted in Python 2.5 by hashlib module.
[e] New in Python 2.3.
Core Module: re
Regular expressions (REs) provide advanced pattern matching scheme for strings. Using a separate syntax that describes these patterns, you can effectively use them as "filters" when passing in the text to perform the searches on. These filters allow you to extract the matched patterns as well as perform find-and-replace or divide up strings based on the patterns that you describe.
The re module, introduced in Python 1.5, obsoletes the original regex and regsub modules from earlier releases. It represented a major upgrade in terms of Python's support for regular expressions, adopting the complete Perl syntax for REs. In Python 1.6, a completely new engine was written (SRE), which added support for Unicode strings as well as significant performance improvements. SRE replaces the old PCRE engine, which had been under the covers of the regular expression modules.
Some of the key functions in the re module include: compile() compiles an RE expression into a reusable RE object; match() attempts to match a pattern from the beginning of a string; search() searches for any matching pattern in the string; and sub() performs a search-and-replace of matches. Some of these functions return match objects with which you can access saved group matches (if any were found). All of Chapter 15 is dedicated to regular expressions.