some python utilities.