-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
35 lines (32 loc) · 787 Bytes
/
example.py
File metadata and controls
35 lines (32 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""
An Example Presentation
about Faketerm
"""
__author__ = "John Doe"
with vi("foo.py"):
print "#!python"
print "print 'syntax highlighting'[:1]"
print "return float(1 + 1)"
with bullets("Example slide"):
print "first bullet point"
print "second bullet point"
print "third bullet point"
with shell() as ctx:
ctx.transition = '%'
print "echo 123"
print "123"
print "echo 123"
print "WOO, SURPRISE! :-)"
print "python"
with pyshell() as ctx:
ctx.transition = None
print "1 + 1"
print "2"
print "def foo():\n pass"
print ""
print "1 / 0"
ctx.throw(ZeroDivisionError("integer division or modulo by zero"))
with chapter() as ctx:
ctx.transition = 3
print "Thanks for listening.."
print "QUESTIONS?"