[IPython-dev] wxPython console

Emmanuel Bacry emmanuel.bacry at polytechnique.fr
Thu Nov 3 08:17:47 EDT 2011


Thank you for your prompt reply.


Thomas Kluyver-2 wrote:
> 
> On 3 November 2011 10:31, Emmanuel Bacry
> <emmanuel.bacry at polytechnique.fr>wrote:
> 
> How does a Wx console widget work? I can't find a reference to it in the
> Wx
> docs.
> 

No, I don't think there is such a thing as a "standard" wx console (I kind
of wrote my own).


Thomas Kluyver-2 wrote:
> 
> There is a protocol to run IPython in a separate process from the
> frontend.
> This is what the Qt console uses. Requests and replies are packed into
> JSON, and sent over ZMQ. There are message types for execution, tab
> completion, history, etc.
> 
> http://ipython.org/ipython-doc/dev/development/messaging.html
> 

1- I think I understand the solution you suggest. However I don't hink it
works for me. Let me tell you what ultimately I want to do :

I wrote a pretty big C++ library for displaying and interacting (using
wxWidget) with scientific plots. It is fast (it is able to manipulate really
long data) and highly interactive. 
My goal is to interface it with python so that I can do computations using a
console and a python interpreter in it. E.g, using numpy to compute some
stuff that I display and interact with.
So I want the python interpreter to be ran in the same process as my library
which is using wx so that they share the data.

I am not so sure this is the case in your solution ? 
When you run ipython, there is a python interpreter encapsulated in it right
?

2- Now wether the console is running in a different process or not is a
different problem.
A priori I don't care if the console runs in a separate process.. though I
do a little.
Let me explain why : 
Sometimes, when dealing with scientific data you want to display huge
quantity of data in the console. You need to have a fast console (look at
matlab console or R, they display a lot of data very quickly).
I'm afraid that sending all the stdout through a socket will be kind of slow


Thomas Kluyver-2 wrote:
> 
> If the console widget is a terminal emulator, a simple shortcut may be to
> start plain ipython in that terminal.
> 
How would you start ipython in a terminal emulator ? (sorry for a so naive
question!)


Thomas Kluyver-2 wrote:
> 
> At the moment, I don't think there's a good way to embed IPython in a GUI
> without starting a separate process, but this is something we want to get
> round to.
> 
Too bad !


Thank you

Emmanuel

-- 
View this message in context: http://old.nabble.com/wxPython-console-tp32057061p32772284.html
Sent from the IPython - Development mailing list archive at Nabble.com.




More information about the IPython-dev mailing list