New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Notebook HTML/JS to send messages to Python code #2313
Comments
This is already done in 0.13. Kernel.execute takes callbacks. See various widget examples for running code from JavaScript. |
Sorry for being dense--can't find any examples of this. I did find this: https://github.com/ipython/ipython/tree/master/docs/examples/widgets/directview but it seems unrelated. Also https://github.com/ipython/ipython/tree/master/docs/examples/notebooks comes up empty. Thanks in advance for your help! |
The directview widget is the only example of this that we have where the JS But, we have plans to support the manipulate style capability in the On Fri, Aug 17, 2012 at 9:39 AM, Min RK notifications@github.com wrote:
Brian E. Granger |
Great--glad to hear that this is possible. As a side issue, the Bessel example doesn't seem to show properly until you edit the cell with the plot div and re-render it. I can't afford to work on this stuff right now, unfortunately, but I'll try to report all the issues I come across. Thanks for all your hard work on this! |
First, +1 to improving discoverability. The example doesn't seem to work in |
|
This amazing example has moved. Here is a link that I think will persist: https://github.com/ipython/ipython-in-depth/blob/a5b04442bd70f6e0d4a1f7a31667cd6d09027061/notebooks/old/Z%20Callbacks.ipynb |
Hi all,
I think it would be terrific if IPython could replicate this:
http://reference.wolfram.com/mathematica/ref/Manipulate.html
Since the notebook already has jquery UI, this is missing pretty much only one component, and that is being able to route AJAX messages back to Python callbacks. API-wise, I'm thinking something like:
And on the JS side, provide a function
call_python("changed-foo-slider", json_obj)
. Since which cell is being updated is not explicitly represented in IPython, there would have to be a bit of magic in the background to make sure that cell is remembered at registration time. But that doesn't sound too frightening.Of course, one could also then build some canned slider wigetry, to match the Mathematica feature, but that would just be icing. :)
Andreas
The text was updated successfully, but these errors were encountered: