UIUC-SINE/ipython-cells: IPython extension for running code blocks in .py files
github.com·5h
Preview
Report Post

ipython-cells

This is an IPython extension for those who prefer to work in a terminal but still need the cell-by-cell execution provided by a Jupyter notebook.

Example Jupyter notebook:

Running exported notebook with ipython-cells:

Quickstart

Install the extension:

pip install ipython-cells

Convert an existing notebook to a Python file (In Jupyter):

Cell > Run All
File > Download As > python (.py)

Execute cells in iPython:

>>> %load_ext ipython_cells
>>> %load_file my_notebook.py
>>> %cell_run 1
>>> %cell_run 2
array([1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j, 1.+0.j])

You can freely add/delete/rename cells in the downloaded my_notebook.py. my_notebook.py is automatically reloaded when changes are made.

Alternatively, you…

Similar Posts

Loading similar posts...