some simple python utilities