##// END OF EJS Templates
* IPython/iplib.py (runsource): remove self.code_to_run_src attribute. I...
* IPython/iplib.py (runsource): remove self.code_to_run_src attribute. I realized this is nothing more than '\n'.join(self.buffer), and having the same data in two different places is just asking for synchronization bugs. This may impact people who have custom exception handlers, so I need to warn ipython-dev about it (F. Mantegazza may use them). * Fix http://www.scipy.net/roundup/ipython/issue38

File last commit:

r0:6f629fcc
r10:ec9735d7
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")