I am opening a process (with os.popen() ) that, for some commands, detects certain keypresses (e.g. ESC - not the character, the key).  Is there a way to send keypress events to the process?
The obvious way would be to start the process in it's own shell.
something like os.popen("sh command")
Python: How do I generate a keypress?