Groups
Groups
Sign in
Groups
Groups
Project Jupyter
Conversations
About
Send feedback
Help
Inserting a new cell from python ?
31 views
Skip to first unread message
nicolas....@synchrotron-soleil.fr
unread,
Jan 18, 2017, 7:36:13 AM
1/18/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Project Jupyter
Hi all,
Is there a way to insert a new cell below the current cell from python?
The idea would be to mimic what the '+' button (or Esc-B sequence) does from the notebook page.
Thanks.
N.
Fernando Perez
unread,
Jan 18, 2017, 3:05:26 PM
1/18/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Project Jupyter
This should do the trick for you:
contents = "hello"
shell = get_ipython()
shell.set_next_input(contents, replace=False)
###
Cheers,
f
nicolas.fr
unread,
Jan 18, 2017, 6:24:37 PM
1/18/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Project Jupyter
That works. Thanks Fernando.
Reply all
Reply to author
Forward
0 new messages