[IPython-dev] set_next_input() multiple times

John Omernik john at omernik.com
Fri Feb 13 11:43:36 EST 2015


I am trying to use set_next_input to add two cells below the cell I am
executing in.  I can do one cell no problem, but when I do the
following code, only Hello2 gets added, there is only a single cell.
How do set two subsequent cells in my currently running notebook (I
don't want to save off and reopen or anything)

Thanks!


myIPython = get_ipython()

cmd = 'Hello1"

myIPython.set_next_input(cmd)

cmd = 'Hello2"

myIPython.set_next_input(cmd)



John



More information about the IPython-dev mailing list