pwd ls message = 'The IPython notebook is great!' # note: the echo command does not run on Windows, it's a unix command. !echo $message %pylab inline x = linspace(0, 3*pi, 500) plot(x, sin(x**2)) title('A simple chirp'); >>> the_world_is_flat = 1 >>> if the_world_is_flat: ... print "Be careful not to fall off!" %run non_existent_file x = 1 y = 4 z = y/(1-x) magic import time, sys for i in range(8): print i, time.sleep(0.5) import sys from ctypes import CDLL # This will crash a Linux or Mac system; equivalent calls can be made on Windows dll = 'dylib' if sys.platform == 'darwin' else 'so.6' libc = CDLL("libc.%s" % dll) libc.time(-1) # BOOM!! from IPython.display import Image Image(filename='figs/logo.png') Image(url='http://python.org/images/python-logo.gif') from IPython.display import SVG SVG(filename='figs/python-logo.svg') from IPython.display import YouTubeVideo # a talk about IPython at Sage Days at U. Washington, Seattle. # Video credit: William Stein. YouTubeVideo('1j_HxD4iLn8') from IPython.display import HTML video = open("figs/animation.m4v", "rb").read() video_encoded = video.encode("base64") video_tag = '