A few python utilities