##// END OF EJS Templates
Cleaned up release tools directory....
Cleaned up release tools directory. Converted almost all to python scripts and made toollib to collect common functions and avoid repetition. Properly commented and documented what each script does. The run_ipy_in_profiler one seems broken, I'm not sure what to do with it. We need to either fix it or remove it later, but it's not critical for 0.10.

File last commit:

r1251:99658885
r2118:ec9810f7
Show More
example-demo.py
40 lines | 1.1 KiB | text/x-python | PythonLexer
fperez
Added demo example to SVN
r34 """A simple interactive demo to illustrate the use of IPython's Demo class.
Any python script can be run as a demo, but that does little more than showing
it on-screen, syntax-highlighted in one shot. If you add a little simple
markup, you can stop at specified intervals and return to the ipython prompt,
resuming execution later.
"""
print 'Hello, welcome to an interactive IPython demo.'
print 'Executing this block should require confirmation before proceeding,'
print 'unless auto_all has been set to true in the demo object'
# The mark below defines a block boundary, which is a point where IPython will
# stop execution and return to the interactive prompt.
# Note that in actual interactive execution,
# <demo> --- stop ---
x = 1
y = 2
# <demo> --- stop ---
# the mark below makes this block as silent
# <demo> silent
print 'This is a silent block, which gets executed but not printed.'
# <demo> --- stop ---
# <demo> auto
print 'This is an automatic block.'
print 'It is executed without asking for confirmation, but printed.'
z = x+y
print 'z=',x
# <demo> --- stop ---
# This is just another normal block.
print 'z is now:', z
print 'bye!'