[IPython-dev] datavis with ipython notebook

Brian Granger ellisonbg@gmail....
Mon Feb 13 21:51:03 CST 2012


On Mon, Feb 13, 2012 at 6:00 PM, Chen-Shan Chin <cschin@infoecho.net> wrote:
> I think this will work....

Yes, you are thinking in the right terms now, but...it won't quite work yet.

> On the javascript widget side, we can use this javascript call IPython.notebook.kernel.shell_channel.send() to execute some python function defined within the kernel

This logic is currently tied to the cell implementation in a way that
won't allow the cell to get the right output.  We need to refactor
something to make this fully possible.  But, once that is done, it
will work in exactly the way you are thinking.

> And one the python side, one can use Javascript() and/or display_javascript() to update the widget....

Yep!

> This is cool. Thanks. (Wish I have time to implement something fun... too much day job overflow.)
>
>
>
> On Feb 13, 2012, at 5:09 PM, Brian Granger wrote:
>
>> I don't think you need to add an additional WebSocket channel for any
>> purpose.  Of course your Javascript widgets are free to talk to *any*
>> WebSocket server in the world, including a modified IPython notebook
>> server.  But as long as you want to talk to your Python code in the
>> backend, you should just use our existing channels.
>>
>> On Mon, Feb 13, 2012 at 4:03 PM, Chen-Shan Chin <cschin@infoecho.net> wrote:
>>> Yes. It will nice to use the  ipython architecture for interactive
>>> stuff.  Let's say if I create a javascript widget, and I want to send the
>>> event to a user defined function/method, what is the best way to do that?
>>> What I think is to have a auxiliary websocket-zmq bridge for this purpose.
>>>  Does it make sense?
>>>
>>>
>>> On Feb 13, 2012, at 2:34 PM, Brian Granger wrote:
>>>
>>> We already have WebSocket based channels that the notebook uses to
>>> talk between the Javascript and Python code running in the kernel.
>>> While it needs to be refactored, all of that infrastructure is already
>>> setup and doesn't need to be reinvented.
>>>
>>>
>>
>>
>>
>> --
>> Brian E. Granger
>> Cal Poly State University, San Luis Obispo
>> bgranger@calpoly.edu and ellisonbg@gmail.com
>



-- 
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com


More information about the IPython-dev mailing list