RedBean
RedBean2w 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
bartlomieju2w ago
Does Python kernel support it?
RedBean
RedBean7d 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
bartlomieju7d ago
Hm interesting. But no it's not supported in Deno ATM. Can you open an issue with feature request?
RedBean
RedBean6d 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.