JuliaPy / JuliaPy/PyCall.jl

Support IPython interactive widgets used in Python code

Open
#89 11 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Julia
Stars
1.5k
Forks
186
PR merge metrics
No merged PRs in 30d

Description

If I load something like vispy or Matplotlib's new nbagg backend, which displays in IPython using IPython's interactive-widget API, it would be good to have it work in Julia as well via PyCall ~~and Interact~~.

What I think this would involve:
- Have a new PyInteract package (that requires PyCall, ~~Interact~~, and IJulia).
- `using PyInteract` would `pyimport("IPython.html.widgets")`, and then monkey-patch it to remap some of the low-level function calls:
- Creating a comm object in Python should instead call the corresponding IJulia/Interact routine
- The `on_msg` callback function of that comm object should call back to IPython to handle the message on the Python side.

I don't know the internals of IPython at all, so some advice from @minrk, @fperez, @ellisonbg, and/or @Carreau would be very helpful:
- What is the minimal set of low-level IPython functions to monkey-patch in order to hook up IPython's widget code to the IJulia plumbing?
- Is monkey-patching the right thing here, or is there some better way to install hooks into IPython to change the widget plumbing?

cc: @shashi, @dcjones

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.