[IPython-dev] Python and Javascript

Brian Granger ellisonbg at gmail.com
Fri Aug 16 14:11:54 EDT 2013


Cyrille,

> I'm involved in the development of a new OpenGL-based visualization
> library in Python (https://github.com/vispy/vispy). We consider adding
> a web backend in the future, and possibly integrating it within the
> IPython notebook.

Very cool!

> I was wondering if you had planned, as part of the development of
> IPython 2.0, to design a kind of "standardized" way to let Python and
> Javascript communicate (protocol messaging? API? etc.). In other
> words, how much IPython-specific will your protocols and interfaces
> be?

Yes and no.

Yes.  I think our vision is that the IPython message spec would be
that universal way of communicating from JavaScript to Python.  We are
trying to design it in a way that is independent of the backend
language and can work in a variety of settings - including non-Python
kernels. We are still working on the design of all the working pieces
for this part of the spec though.  Once we are further along we will
solicit feedback on the ipython-dev list.

No. We don't have any plans other than our message spec to standardize
this type of thing.  It is just beyond the scope of the project.
Also, I think that if this was attempted, the result would be
extremely similar to our message spec - at least if it has the same
functionality - there is only so many ways of shoving this data over
JSON+WebSockets.

> I imagine it would be great to let non IPython-related projects
> develop Python-Javascript interfaces that are fully compatible with
> IPython. It would make it very easy to integrate these projects in the
> IPython notebook, and it would prevent every project from reinventing
> the wheel every time.

I agree that projects shoudn't have to re-invent the wheel.  If it
turns out that our message spec isn't sufficient, to prevent this from
happening, we will change it.  That will be one of the most important
tests of the design.

Cheers,

Brian

> Best,
> Cyrille
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



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



More information about the IPython-dev mailing list