pyterm: make it usable with python 2 and 3

Alternative to #1032

As a bonus I added a setup script for hustle-free installation of pyterm and fixed a little bug I found with pylint. ;-)