Author: bugman Date: Sun Oct 7 18:53:30 2012 New Revision: 17720 URL: http://svn.gna.org/viewcvs/relax?rev=17720&view=rev Log: Python 3 fix - removed the use of the string module from generic_fns.spectrum. Modified: trunk/generic_fns/spectrum.py Modified: trunk/generic_fns/spectrum.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/spectrum.py?rev=17720&r1=17719&r2=17720&view=diff ============================================================================== --- trunk/generic_fns/spectrum.py (original) +++ trunk/generic_fns/spectrum.py Sun Oct 7 18:53:30 2012 @@ -27,7 +27,6 @@ # Python module imports. from math import sqrt from re import split -import string import sys from warnings import warn @@ -777,9 +776,9 @@ # The residue number res_num = '' try: - res_num = string.strip(line[1], '{') - res_num = string.strip(res_num, '}') - res_num = string.split(res_num, '.') + res_num = line[1].strip('{') + res_num = res_num.strip('}') + res_num = res_num.split('.') res_num = res_num[0] except ValueError: raise RelaxError("The peak list is invalid.") @@ -787,15 +786,15 @@ # Nuclei names. x_name = '' if line[8]!='{}': - x_name = string.strip(line[8], '{') - x_name = string.strip(x_name, '}') - x_name = string.split(x_name, '.') + x_name = line[8].strip('{') + x_name = x_name.strip('}') + x_name = x_name.split('.') x_name = x_name[1] h_name = '' if line[1]!='{}': - h_name = string.strip(line[1], '{') - h_name = string.strip(h_name, '}') - h_name = string.split(h_name, '.') + h_name = line[1].strip('{') + h_name = h_name.strip('}') + h_name = h_name.split('.') h_name = h_name[1] # Intensity.