Various python utilities