edited nanpy_test_pattern.py to use curses for keybinding support.