RedBean
RedBean3mo ago

Can Jupyter deno create a new cell and/or modify a cell from another cell in the same notebook ?

Can Jupyter deno create a new cell and/or modify a cell from another cell in the same notebook ?
4 Replies
bartlomieju
bartlomieju3mo ago
Does Python kernel support it?
RedBean
RedBeanOP3mo ago
It seems possible, this is from chatGPT
from IPython.display import display, Javascript

# Modify a cell using JavaScript
display(Javascript("""
var cell = Jupyter.notebook.get_selected_cell();
cell.set_text('print("This cell has been modified!")');
"""))
from IPython.display import display, Javascript

# Modify a cell using JavaScript
display(Javascript("""
var cell = Jupyter.notebook.get_selected_cell();
cell.set_text('print("This cell has been modified!")');
"""))
bartlomieju
bartlomieju3mo ago
Hm interesting. But no it's not supported in Deno ATM. Can you open an issue with feature request?
RedBean
RedBeanOP3mo ago
I'm wondering if this is a limitation of Jupyter running in VS Code. I don't think I know enough about the topic to create a good issue.

Did you find this page helpful?