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 3838Larger snippets can be placed in a file (as opposed to a command-line
3939arg) and processed with the -f option.
4040"""
41+ from __future__ import print_function
4142
4243__author__ = "Collin Winter <collinw@gmail.com>"
4344
@@ -65,7 +66,7 @@ def main(args):
6566 elif len (args ) > 1 :
6667 tree = driver .parse_stream (StringIO (args [1 ] + "\n " ))
6768 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 )
6970 return 1
7071
7172 examine_tree (tree )
@@ -75,10 +76,10 @@ def examine_tree(tree):
7576 for node in tree .post_order ():
7677 if isinstance (node , pytree .Leaf ):
7778 continue
78- print repr (str (node ))
79+ print ( repr (str (node ) ))
7980 verdict = raw_input ()
8081 if verdict .strip ():
81- print find_pattern (node )
82+ print ( find_pattern (node ) )
8283 return
8384
8485def find_pattern (node ):
You can’t perform that action at this time.
0 commit comments