Author: bugman Date: Thu Sep 27 19:19:13 2012 New Revision: 17576 URL: http://svn.gna.org/viewcvs/relax?rev=17576&view=rev Log: Some changes in preparation for Python 3. Modified: trunk/extern/scientific_python/Geometry/VectorModule.py trunk/extern/scientific_python/Geometry/__init__.py trunk/extern/scientific_python/IO/FortranFormat.py trunk/extern/scientific_python/IO/PDB.py Modified: trunk/extern/scientific_python/Geometry/VectorModule.py URL: http://svn.gna.org/viewcvs/relax/trunk/extern/scientific_python/Geometry/VectorModule.py?rev=17576&r1=17575&r2=17576&view=diff ============================================================================== --- trunk/extern/scientific_python/Geometry/VectorModule.py (original) +++ trunk/extern/scientific_python/Geometry/VectorModule.py Thu Sep 27 19:19:13 2012 @@ -62,11 +62,11 @@ __deepcopy__ = __copy__ def __repr__(self): - return 'Vector(%s,%s,%s)' % (`self.array[0]`,\ - `self.array[1]`, `self.array[2]`) + return 'Vector(%s,%s,%s)' % (repr(self.array[0]),\ + repr(self.array[1]), repr(self.array[2])) def __str__(self): - return `list(self.array)` + return repr(list(self.array)) def __add__(self, other): return Vector(self.array+other.array) Modified: trunk/extern/scientific_python/Geometry/__init__.py URL: http://svn.gna.org/viewcvs/relax/trunk/extern/scientific_python/Geometry/__init__.py?rev=17576&r1=17575&r2=17576&view=diff ============================================================================== --- trunk/extern/scientific_python/Geometry/__init__.py (original) +++ trunk/extern/scientific_python/Geometry/__init__.py Thu Sep 27 19:19:13 2012 @@ -51,7 +51,7 @@ import sys -if sys.modules.has_key('epydoc'): +if 'epydoc' in sys.modules.has_key: import VectorModule, TensorModule Vector = VectorModule.Vector isVector = VectorModule.isVector Modified: trunk/extern/scientific_python/IO/FortranFormat.py URL: http://svn.gna.org/viewcvs/relax/trunk/extern/scientific_python/IO/FortranFormat.py?rev=17576&r1=17575&r2=17576&view=diff ============================================================================== --- trunk/extern/scientific_python/IO/FortranFormat.py (original) +++ trunk/extern/scientific_python/IO/FortranFormat.py Thu Sep 27 19:19:13 2012 @@ -212,17 +212,17 @@ if value is None: s = '' elif type == 'I': - s = `value` + s = repr(value) elif type == 'D': - s = ('%'+`length`+'.'+`fraction`+'e') % value + s = ('%'+repr(length)+'.'+repr(fraction)+'e') % value n = string.find(s, 'e') s = s[:n] + 'D' + s[n+1:] elif type == 'E': - s = ('%'+`length`+'.'+`fraction`+'e') % value + s = ('%'+repr(length)+'.'+repr(fraction)+'e') % value elif type == 'F': - s = ('%'+`length`+'.'+`fraction`+'f') % value + s = ('%'+repr(length)+'.'+repr(fraction)+'f') % value elif type == 'G': - s = ('%'+`length`+'.'+`fraction`+'g') % value + s = ('%'+repr(length)+'.'+repr(fraction)+'g') % value else: raise ValueError('Not yet implemented') s = string.upper(s) Modified: trunk/extern/scientific_python/IO/PDB.py URL: http://svn.gna.org/viewcvs/relax/trunk/extern/scientific_python/IO/PDB.py?rev=17576&r1=17575&r2=17576&view=diff ============================================================================== --- trunk/extern/scientific_python/IO/PDB.py (original) +++ trunk/extern/scientific_python/IO/PDB.py Thu Sep 27 19:19:13 2012 @@ -663,7 +663,7 @@ def __str__(self): s = self.__class__.__name__ + ' ' + self.name + ':\n' for atom in self.atom_list: - s = s + ' ' + `atom` + '\n' + s = s + ' ' + repr(atom) + '\n' return s __repr__ = __str__