Miscellaneous python tools