[IPython-dev] wxPython console
Emmanuel Bacry
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.
>
> Thomas
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)
interactiveshell.run_cell(command)
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
Emmanuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20111108/f9e8afdb/attachment.html>
More information about the IPython-dev
mailing list