Miscellaneous utilities in Python