File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 38
38
Larger snippets can be placed in a file (as opposed to a command-line
39
39
arg) and processed with the -f option.
40
40
"""
41
+ from __future__ import print_function
41
42
42
43
__author__ = "Collin Winter <[email protected] >"
43
44
@@ -65,7 +66,7 @@ def main(args):
65
66
elif len (args ) > 1 :
66
67
tree = driver .parse_stream (StringIO (args [1 ] + "\n " ))
67
68
else :
68
- print >> sys . stderr , "You must specify an input file or an input string"
69
+ print ( "You must specify an input file or an input string" , file = sys . stderr )
69
70
return 1
70
71
71
72
examine_tree (tree )
@@ -75,10 +76,10 @@ def examine_tree(tree):
75
76
for node in tree .post_order ():
76
77
if isinstance (node , pytree .Leaf ):
77
78
continue
78
- print repr (str (node ))
79
+ print ( repr (str (node ) ))
79
80
verdict = raw_input ()
80
81
if verdict .strip ():
81
- print find_pattern (node )
82
+ print ( find_pattern (node ) )
82
83
return
83
84
84
85
def find_pattern (node ):
You can’t perform that action at this time.
0 commit comments