various python utilies