Execution of an individual cell programmatically from its own output button onclick event
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
````
from IPython.display import display, Markdown, clear_output
import ipywidgets as widgets
from ipywidgets import Layout
backbutton = widgets.Button(
description="Back",
disabled=False,
icon=''
)
def buttonclicked(_):
with buttonout:
clear_output()
# need code here to execute the current cell
backbutton.on_click(buttonclicked)
`````
This buttonclicked function is actually a python ipywidgets library button's onclick function. This is an ouput of an individual cell. I want to run the same cell once more when I click on this button and get the initial output result. How to do it programmatically from inside the buttonclicked function ?
Contributor guide
Research direction
The payload names no repository files or tests; start by reproducing the Python ipywidgets Button callback in a Jupyter Notebook and trace how the output area and current cell are represented. Done means defining a supported way to rerun only the originating cell from its output button, with its initial output restored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- developer-experience, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100