Author: bugman Date: Tue Oct 9 10:26:13 2012 New Revision: 17780 URL: http://svn.gna.org/viewcvs/relax?rev=17780&view=rev Log: Python 3 fix for the model-free BMRB export - many string module methods no longer exist. Modified: trunk/specific_fns/model_free/bmrb.py Modified: trunk/specific_fns/model_free/bmrb.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_fns/model_free/bmrb.py?rev=17780&r1=17779&r2=17780&view=diff ============================================================================== --- trunk/specific_fns/model_free/bmrb.py (original) +++ trunk/specific_fns/model_free/bmrb.py Tue Oct 9 10:26:13 2012 @@ -89,7 +89,7 @@ return item[1] # No whitespace. - if string.replace(item[0], ' ', '') == name: + if item[0].replace(' ', '') == name: return item[1] # Should not be here! @@ -116,7 +116,7 @@ keys = data.keys() # Sample conditions do not match (remove the $ sign). - if 'sample_cond_list_label' in keys and sample_conditions and string.replace(data['sample_cond_list_label'], '$', '') != sample_conditions: + if 'sample_cond_list_label' in keys and sample_conditions and data['sample_cond_list_label'].replace('$', '') != sample_conditions: continue # Global data. @@ -485,7 +485,7 @@ # The nuclear isotope. if hasattr(spin, 'isotope'): - isotope_list.append(int(string.strip(spin.isotope, string.ascii_letters))) + isotope_list.append(int(spin.isotope.strip(string.ascii_letters))) else: isotope_list.append(None)