various python utilities