Programmatically exit the REPL
david.huard at gmail.com
Tue Sep 16 22:25:13 CEST 2008
> Does anyone know how to make raw_input think it has gotten input?
So you really need raw_input ? Couldn't you use a mock-up ?
And get the user input with something like:
input = os.read(sys.stdin.fileno(), 80).strip()
if input== '':
The background thread can stop the listening thread by setting
self.continue to False.
The subversion trunk of pymc (on google code) has something that I think
is similar to your problem, you might want to look at it (look at
More information about the Python-list