##// END OF EJS Templates
use system_raw in terminal, even on Windows...
use system_raw in terminal, even on Windows `system_raw` uses `os.system` instead of `utils.process.system`, and makes more sense in a Terminal session. There was discussion that it should be otherwise on Windows, but I can't find any actual evidence for why this would be the case, and there are very clear disadvantages to not using `os.system` (see #978 and #181). closes gh-978

File last commit:

r1248:19e3b286
r5276:a7b48096
Show More
nbexample_output.py
20 lines | 642 B | text/x-python | PythonLexer
/ docs / attic / 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")