old/perftool.py: example how to use terminal emulation