Show More
@@ -5,7 +5,7 b' lines = sys.stdin.readlines()' | |||||
5 | while lines: |
|
5 | while lines: | |
6 | l = lines.pop(0) |
|
6 | l = lines.pop(0) | |
7 | if l.startswith('SALT'): |
|
7 | if l.startswith('SALT'): | |
8 |
print |
|
8 | print(l[:-1]) | |
9 | elif l.startswith('>>> '): |
|
9 | elif l.startswith('>>> '): | |
10 | snippet = l[4:] |
|
10 | snippet = l[4:] | |
11 | while lines and lines[0].startswith('... '): |
|
11 | while lines and lines[0].startswith('... '): | |
@@ -13,6 +13,6 b' while lines:' | |||||
13 | snippet += l[4:] |
|
13 | snippet += l[4:] | |
14 | c = compile(snippet, '<heredoc>', 'single') |
|
14 | c = compile(snippet, '<heredoc>', 'single') | |
15 | try: |
|
15 | try: | |
16 |
exec |
|
16 | exec(c, globalvars) | |
17 |
except Exception |
|
17 | except Exception as inst: | |
18 |
print |
|
18 | print(repr(inst)) |
General Comments 0
You need to be logged in to leave comments.
Login now