Changes to terminal.py to work on Python 3