##// END OF EJS Templates
Improve 'save history' menu (%save)...
Improve 'save history' menu (%save) Real file chooser menu, get the current session history range by default. If the file already exist, the user will be prompted twice if he/she really want to be override the existing file ( by the gui, and the magic afterward) One might also to add the (-r) %save option into the gui.

File last commit:

r4406:0251893c
r5030:cf3ca98e
Show More
nbexamples.py
29 lines | 435 B | text/x-python | PythonLexer
from ..nbbase import (
NotebookNode,
new_code_cell, new_text_cell, new_notebook
)
nb0 = new_notebook()
nb0.cells.append(new_text_cell(
text='Some NumPy Examples'
))
nb0.cells.append(new_code_cell(
code='import numpy',
prompt_number=1
))
nb0.cells.append(new_code_cell(
code='a = numpy.random.rand(100)',
prompt_number=2
))
nb0.cells.append(new_code_cell(
code='print a',
prompt_number=3
))