Ben Finney wrote:
I need a solution that is specific to the Python program: it should only affect this program, and should not need anything special done to the terminal when invoking the program.
You might be able to do something with the termios module to put the tty driver into the appropriate mode. If you do that, you'll have to be careful to set it back again before the program exits for any reason, otherwise your shell session will be messed up. -- Greg -- https://mail.python.org/mailman/listinfo/python-list