From 1404be4bf126a403d801c2470c112624c5b36fc8 Mon Sep 17 00:00:00 2001 From: jevans Date: Mon, 17 Jun 2013 20:36:22 -0400 Subject: [PATCH] Closes #49 --- glymur/codestream.py | 2 +- glymur/jp2box.py | 10 +++++----- glymur/jp2k.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/glymur/codestream.py b/glymur/codestream.py index f433eca..b7598cf 100644 --- a/glymur/codestream.py +++ b/glymur/codestream.py @@ -226,7 +226,7 @@ class Codestream: def __str__(self): msg = 'Codestream:\n' for segment in self.segment: - strs = segment.__str__() + strs = str(segment) # Add indentation strs = [(' ' + x + '\n') for x in strs.split('\n')] diff --git a/glymur/jp2box.py b/glymur/jp2box.py index 0ee95c2..bb313df 100644 --- a/glymur/jp2box.py +++ b/glymur/jp2box.py @@ -532,7 +532,7 @@ class ContiguousCodestreamBox(Jp2kBox): msg = Jp2kBox.__str__(self) msg += '\n Main header:' for segment in self.main_header.segment: - segstr = segment.__str__() + segstr = str(segment) # Add indentation. strs = [('\n ' + x) for x in segstr.split('\n')] @@ -760,7 +760,7 @@ class AssociationBox(Jp2kBox): def __str__(self): msg = Jp2kBox.__str__(self) for box in self.box: - boxstr = box.__str__() + boxstr = str(box) # Add indentation. strs = [('\n ' + x) for x in boxstr.split('\n')] @@ -824,7 +824,7 @@ class JP2HeaderBox(Jp2kBox): def __str__(self): msg = Jp2kBox.__str__(self) for box in self.box: - boxstr = box.__str__() + boxstr = str(box) # Add indentation. strs = [('\n ' + x) for x in boxstr.split('\n')] @@ -1177,7 +1177,7 @@ class ResolutionBox(Jp2kBox): def __str__(self): msg = Jp2kBox.__str__(self) for box in self.box: - boxstr = box.__str__() + boxstr = str(box) # Add indentation. strs = [('\n ' + x) for x in boxstr.split('\n')] @@ -1554,7 +1554,7 @@ class UUIDInfoBox(Jp2kBox): msg = Jp2kBox.__str__(self) for box in self.box: - box_str = box.__str__() + box_str = str(box) # Add indentation. lst = [('\n ' + x) for x in box_str.split('\n')] diff --git a/glymur/jp2k.py b/glymur/jp2k.py index af08c2b..b09271e 100644 --- a/glymur/jp2k.py +++ b/glymur/jp2k.py @@ -87,10 +87,10 @@ class Jp2k(Jp2kBox): metadata = ['File: ' + os.path.basename(self.filename)] if len(self.box) > 0: for box in self.box: - metadata.append(box.__str__()) + metadata.append(str(box)) else: c = self.get_codestream() - metadata.append(c.__str__()) + metadata.append(str(c)) return '\n'.join(metadata) def _parse(self):