From 99f074da278d4ec80689c0e22e20c5552ea12512 Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Fri, 12 Apr 2019 20:47:01 -0700 Subject: [PATCH] Fix the listing/map output to be Python 3 compatible --- src/Ophis/Listing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ophis/Listing.py b/src/Ophis/Listing.py index d7b606b..186e2eb 100644 --- a/src/Ophis/Listing.py +++ b/src/Ophis/Listing.py @@ -40,7 +40,7 @@ class Listing(object): if self.filename == "-": out = sys.stdout else: - out = file(self.filename, "w") + out = open(self.filename, "wt") for x in self.listing: if type(x) is str: print(x, file=out) @@ -118,7 +118,7 @@ class LabelMapper(object): if self.filename == "-": out = sys.stdout else: - out = file(self.filename, "w") + out = open(self.filename, "wt") maxlabellen = 0 self.labeldata.sort() for (loc, label, srcloc) in self.labeldata: