How to do...?
quinn at mark.ugcs.caltech.edu
Fri Nov 3 21:15:42 CET 2000
On Fri, 3 Nov 2000 19:22:30 +0100, Guy Van Rentergem
<guy.van.rentergem at skynet.be> wrote:
>How can I put characters in the keyboard buffer without typing anything?
>From within python you colud do something like:
def __init__(self, fp):
self.fp = fp
def push(self, line):
and replace the file you're reading from with PushFile. This can be handy for
automatically testing interactive programs.
If you want to control an external program's keyboard input, see the expect
More information about the Python-list