summaryrefslogtreecommitdiff
blob: 4bff7f8f40dd012f53d6eb68022472523abd08cb (plain)
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
36
37
38
39
40
41
42
43
44
45
46
From d051588873a54860cfb86ec0d330f7d855336618 Mon Sep 17 00:00:00 2001
From: Julien Cristau <julien.cristau@logilab.fr>
Date: Tue, 2 Dec 2014 10:41:05 +0100
Subject: [PATCH 2/2] Convert print statements to python3-style print function

Signed-off-by: Julien Cristau <julien.cristau@logilab.fr>
---
 yapps/runtime.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/yapps/runtime.py b/yapps/runtime.py
index 58017fe..5d40581 100644
--- a/yapps/runtime.py
+++ b/yapps/runtime.py
@@ -178,7 +178,7 @@ class Scanner(object):
         file,line,p = pos
         if file != self.filename:
             if self.stack: return self.stack.print_line_with_pointer(pos,length=length,out=out)
-            print >>out, "(%s: not in input buffer)" % file
+            print("(%s: not in input buffer)" % file, file=out)
             return
 
         text = self.input
@@ -201,7 +201,7 @@ class Scanner(object):
                     break
                 spos = cr+1
         else:
-            print >>out, "(%s:%d not in input buffer)" % (file,origline)
+            print("(%s:%d not in input buffer)" % (file,origline), file=out)
             return
 
         # Now try printing part of the line
@@ -230,8 +230,8 @@ class Scanner(object):
             p = p - 7
 
         # Now print the string, along with an indicator
-        print >>out, '> ',text
-        print >>out, '> ',' '*p + '^'
+        print('> ',text, file=out)
+        print('> ',' '*p + '^', file=out)
 
     def grab_input(self):
         """Get more input if possible."""
-- 
2.6.4