This module provides compatibility for older Python versions back to 2.4, allowing the use of some newer features.
The following modules and functions are available, and should be imported from ibid.compat rather than elsewhere.
Standard Python email.utils.
Functions for parsing and formatting e-Mail headers.
Standard Python hashlib.
Cryptographic hash functions.
On Python 2.4 it won’t support the SHA-2 functions: hashlib.sha224(), hashlib.sha384() and hashlib.sha512() – these will all return 'Not Supported'.
Standard Python json, using SimpleJSON on older versions.
JSON serialisation and parsing library.
Standard Python xml.etree.cElementTree, using ElementTree on older versions.
Standard Python collections.defaultdict.
Returns a dict-like-object where all unset values contain the value returned by default_factory().
Standard Python any().
Return True if any single item in iterable is True.
Standard Python datetime.datetime.strptime().
Return a datetime corrosponding to date_string, according to format.
Standard Python math.factorial().
Return the factorial of x.