##// END OF EJS Templates
- Cleanup [1786], which went in with unfinished stuff by accident....
- Cleanup [1786], which went in with unfinished stuff by accident. - Revert [1785] and replace it by installing our own quitter in place of the builtin (for all py versions). This obviates the need for [1785] and gives a cleaner exit. - Fix ipdb to work with python 2.5, and update ipdb color schemes with %colors. - irunner improvements, mostly for use as a doctest runner.

File last commit:

r0:6f629fcc
r368:ede41cba
Show More
nbexample_output.py
20 lines | 642 B | text/x-python | PythonLexer
/ doc / nbexample_output.py
from notebook.markup import rest
rest.title('This is a Python Notebook')
rest.text("""\
Some plain text, without any special formatting.
Below, we define a simple function to add two numbers.""")
def add(x,y):
return x+y
rest.text("Let's use it with x=2,y=3:")
# This simply means that all code until the next markup call is to be executed
# as a single call. The editing screen should mark the whole group of lines
# with a single In[NN] tag (like IPython does, but with multi-line capabilities)
rest.input()
add(2,3)
# This output would appear on-screen (in the editing window) simply marked
# with an Out[NN] tag
rest.output("5")