Useful extra bits for Python that should be in the standard library
