Show More
@@ -1,7 +1,6 b'' | |||||
1 | import sys |
|
1 | import sys | |
2 |
|
2 | |||
3 | globalvars = {} |
|
3 | globalvars = {} | |
4 | localvars = {} |
|
|||
5 | lines = sys.stdin.readlines() |
|
4 | lines = sys.stdin.readlines() | |
6 | while lines: |
|
5 | while lines: | |
7 | l = lines.pop(0) |
|
6 | l = lines.pop(0) | |
@@ -14,6 +13,6 b' while lines:' | |||||
14 | snippet += "\n" + l[4:] |
|
13 | snippet += "\n" + l[4:] | |
15 | c = compile(snippet, '<heredoc>', 'single') |
|
14 | c = compile(snippet, '<heredoc>', 'single') | |
16 | try: |
|
15 | try: | |
17 |
exec c in globalvars |
|
16 | exec c in globalvars | |
18 | except Exception, inst: |
|
17 | except Exception, inst: | |
19 | print repr(inst) |
|
18 | print repr(inst) |
General Comments 0
You need to be logged in to leave comments.
Login now