diff options
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/ruby/SConscript | 4 | ||||
-rw-r--r-- | src/mem/slicc/main.py | 6 | ||||
-rw-r--r-- | src/mem/slicc/util.py | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/mem/ruby/SConscript b/src/mem/ruby/SConscript index 5cae880bd..64e798fd5 100644 --- a/src/mem/ruby/SConscript +++ b/src/mem/ruby/SConscript @@ -28,6 +28,8 @@ # # Authors: Nathan Binkert +from __future__ import print_function + import os import sys @@ -101,7 +103,7 @@ generated_dir = Dir('../protocol') def MakeIncludeAction(target, source, env): f = file(str(target[0]), 'w') for s in source: - print >>f, '#include "%s"' % str(s.abspath) + print('#include "%s"' % str(s.abspath), file=f) f.close() def MakeInclude(source): diff --git a/src/mem/slicc/main.py b/src/mem/slicc/main.py index 0b528d805..05a5cdb97 100644 --- a/src/mem/slicc/main.py +++ b/src/mem/slicc/main.py @@ -25,6 +25,8 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import print_function + import os import sys @@ -45,7 +47,7 @@ def eprint(format, *args): if args: format = format % args - print >>sys.stderr, format + print(format, file=sys.stderr) def main(args=None): import optparse @@ -79,7 +81,7 @@ def main(args=None): if opts.print_files: for i in sorted(slicc.files()): - print ' %s' % i + print(' %s' % i) else: output("Processing AST...") slicc.process() diff --git a/src/mem/slicc/util.py b/src/mem/slicc/util.py index 83badf46d..3a0cf5f35 100644 --- a/src/mem/slicc/util.py +++ b/src/mem/slicc/util.py @@ -24,6 +24,8 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import print_function + import os import sys @@ -66,7 +68,7 @@ class Location(object): if args: message = message % args #raise Exception, "%s: Warning: %s" % (self, message) - print >>sys.stderr, "%s: Warning: %s" % (self, message) + print("%s: Warning: %s" % (self, message), file=sys.stderr) def error(self, message, *args): if args: |