From: W. Trevor King Date: Sat, 21 Jul 2012 12:42:10 +0000 (-0400) Subject: Don't use u'...' syntax in igor.igorpy. X-Git-Tag: v0.2~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=446da7b2ef8055eca5a0dadc532579d42b25e4b7;p=igor.git Don't use u'...' syntax in igor.igorpy. This breaks Python 2 Unicode handling, but it allows igorpy to be used in its raw form by Python 3. --- diff --git a/igor/igorpy.py b/igor/igorpy.py index 0de34d5..a552edb 100644 --- a/igor/igorpy.py +++ b/igor/igorpy.py @@ -118,7 +118,7 @@ class Wave(IgorObject): def __array__(self): return self.data - __repr__ = __str__ = lambda s: u"" % s.format() + __repr__ = __str__ = lambda s: "" % s.format() class Recreation(IgorObject): """ @@ -187,7 +187,7 @@ class Folder(IgorObject): raise KeyError("Folder %s does not exist"%key) def __str__(self): - return u"" % "/".join(self.path) + return "" % "/".join(self.path) __repr__ = __str__ @@ -207,9 +207,9 @@ class Folder(IgorObject): pass def format(self, indent=0): - parent = u" "*indent+self.name + parent = " "*indent+self.name children = [r.format(indent=indent+2) for r in self.children] - return u"\n".join([parent]+children) + return "\n".join([parent]+children) def loads(s, **kwargs): @@ -231,7 +231,7 @@ def load(filename, **kwargs): def _convert(packed_experiment, ignore_unknown=True): records, filesystem = packed_experiment - stack = [Folder(path=[u'root'])] + stack = [Folder(path=['root'])] for record in records: if isinstance(record, _UnknownRecord): if ignore_unknown: