[snip]
Does anyone know how to make raw_input think it has gotten input?
-Matt
Hi Matt,
So you really need raw_input ? Couldn't you use a mock-up ?
sys.stdout.write(' ')
sys.stdout.flush()
And get the user input with something like:
while self.continue:
input =
Without reading your post properly or having tried to do the same thing
myself: I think you might want to have a look at ipython; it gives a better
REPL and embedding ipython should give you plenty of hits as well.
Matthew Fitzgibbons [EMAIL PROTECTED] writes:
I've got a pretty complex
Alexander Schmolck wrote:
Without reading your post properly or having tried to do the same thing
myself: I think you might want to have a look at ipython; it gives a better
REPL and embedding ipython should give you plenty of hits as well.
Thanks for the tip; I hadn't heard of ipython
Almar Klein wrote:
Hi,
If you insist on writing your own shell, you can also consider running
the commands in another python process.
I took the source code of Pype as an example, which uses a wx.Process.
I've tried the subprocess module as well, but could not get it to work.
Almar
Matthew Fitzgibbons wrote:
I've got a pretty complex interactive command line program. Instead of
writing my own REPL, I'm using the Python interpreter (an infinitely
better solution). This program has two threads, a background thread and
the REPL thread. When you call quit() or sys.exit() in
I've got a pretty complex interactive command line program. Instead of
writing my own REPL, I'm using the Python interpreter (an infinitely
better solution). This program has two threads, a background thread and
the REPL thread. When you call quit() or sys.exit() in the REPL thread,
everything