Updated scripts for Python3

Tested with Python 3.3.  Haven’t tried in other 3.x versions.