Update base script to work with Python 3.