[IPython-dev] wxPython console
emmanuel.bacry at polytechnique.fr
Tue Nov 8 09:45:59 EST 2011
> On 7 November 2011 14:51, Emmanuel Bacry <emmanuel.bacry at polytechnique.fr> wrote:
> I have some problem using this last advice for redirection. Let me explain.
> If I override sys.stdout before creating the InteractiveShell, then it fails :
> Looking at the code for IPython.utils.io, it seems your stdout object needs to have both .write() and .flush() methods. With this done, the default displayhook should just work.
Yes, I'm sorry I could have find it myself.
However I have another problem :
Under wxPython I create an interactiveShell. I have a single button so that when I click on it a thread is ran in which a command is sent to the interactive shell:
(I did not redirect any of stdout or sterr)
If the command is valid, everything goes well. If not (for instance command = "ytytyutuy") then the thread never terminates and nothing is printed on stderr
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev