In [1]:
import nb2py
In [2]:
#~
#This is a cell example with the standard marker
a=2
b=3
print(a+b)
In [3]:
nb2py.dump('tutorial.ipynb','tutorial_files/standard.py')
In [4]:
#please export this cell
#This is a cell with a custom comment as marker
x=10
y=11
print(x+y)
In [5]:
nb2py.dump('tutorial.ipynb','tutorial_files/custom.py',marker='please export this cell')
In [6]:
nb2py.dump_indices('tutorial.ipynb',
'tutorial_files/indices.py',
indices=[3,5])
In [7]:
nb2py.dump_indices('tutorial.ipynb',
'tutorial_files/markdown.md',
indices=[0,2,7])