pyterm: make mostly pep8 compliant