marimo icon indicating copy to clipboard operation
marimo copied to clipboard

GUI Event Loop integration

Open akshayka opened this issue 1 year ago • 1 comments

Description

GUI libraries such as napari rely on IPython's opt-in integration with GUI event loops to render and respond to user interactions.

We currently have no support for integrating with GUI event loops.

Suggested solution

Provide integrations with GUI event loops, and let third-party libraries start these event loops.

Alternative

No response

Additional context

Documentation on IPython's GUI event loop: https://ipython.readthedocs.io/en/stable/config/eventloops.html#integrating-with-gui-event-loops

Napari's documention on the GUI event loop: https://napari.org/stable/guides/event_loop.html#in-ipython-or-jupyter-notebook

IPython kernel's event loop integration: https://github.com/ipython/ipykernel/blob/main/ipykernel/eventloops.py

akshayka avatar Aug 09 '24 15:08 akshayka

I love what you've built with marimo.

One of the reasons I'm holding back from switching over fully to marimo is a feature like this. I use napari currently and can't seem to launch a new qt session from a marimo cell:

napari.view_image(img_array)

doesn't really do anything.

Is this feature on the roadmap?

pavanramkumar avatar Sep 11 '24 21:09 pavanramkumar

not sure where this is at currently, but had a discussion with some colleagues and napari is a critical part of their workflow. for our adoption of marimo, it'd have to support GUI event loop integration

erikjamesmason avatar May 03 '25 16:05 erikjamesmason