py3 compatibility for display-terminalinfo.py