Author: bugman Date: Wed Jul 2 09:50:36 2014 New Revision: 24396 URL: http://svn.gna.org/viewcvs/relax?rev=24396&view=rev Log: Python 3 fixes for the entire codebase using the 2to3 script. The command used was: 2to3 -j 4 -w -f xrange . Modified: trunk/test_suite/shared_data/dispersion/profiling/profiling_cr72.py trunk/test_suite/system_tests/relax_disp.py Modified: trunk/test_suite/shared_data/dispersion/profiling/profiling_cr72.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/profiling/profiling_cr72.py?rev=24396&r1=24395&r2=24396&view=diff ============================================================================== --- trunk/test_suite/shared_data/dispersion/profiling/profiling_cr72.py (original) +++ trunk/test_suite/shared_data/dispersion/profiling/profiling_cr72.py Wed Jul 2 09:50:36 2014 @@ -101,10 +101,10 @@ # Required data structures. self.num_points = num_points - self.ncyc_list = range(2, 2*self.num_points + 1, 2) + self.ncyc_list = list(range(2, 2*self.num_points + 1, 2)) self.relax_time = 0.04 self.points = array(self.ncyc_list) / self.relax_time - self.value = array(range(1, len(self.ncyc_list)+1), float64) * 1.00 + self.value = array(list(range(1, len(self.ncyc_list)+1)), float64) * 1.00 self.error = ones(len(self.ncyc_list), float64) * 0.01 # Make nested list arrays of data. And return them. @@ -354,7 +354,7 @@ params = C1.assemble_param_vector(r2a=5.0, r2b=10.0, dw=3.0, pA=0.9, kex=1000.0, spins_params=['r2a', 'r2b', 'dw', 'pA', 'kex']) # Repeat the function call, to simulate minimisation. - for i in xrange(iter): + for i in range(iter): chi2 = C1.calc(params) @@ -380,7 +380,7 @@ params = C1.assemble_param_vector(r2a=5.0, r2b=10.0, dw=3.0, pA=0.9, kex=1000.0, spins_params=['r2a', 'r2b', 'dw', 'pA', 'kex']) # Repeat the function call, to simulate minimisation. - for i in xrange(iter): + for i in range(iter): chi2 = C1.calc(params) Modified: trunk/test_suite/system_tests/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=24396&r1=24395&r2=24396&view=diff ============================================================================== --- trunk/test_suite/system_tests/relax_disp.py (original) +++ trunk/test_suite/system_tests/relax_disp.py Wed Jul 2 09:50:36 2014 @@ -4691,7 +4691,7 @@ pipe_name = 'base pipe' pipe_type = 'relax_disp' pipe_name_r2eff = "%s_R2eff"%(pipe_name) - select_spin_index = range(0, 1) + select_spin_index = list(range(0, 1)) self.setup_sod1wt_t25(pipe_name=pipe_name, pipe_type=pipe_type, pipe_name_r2eff=pipe_name_r2eff, select_spin_index=select_spin_index) # Generate r20 key. @@ -4840,7 +4840,7 @@ pipe_name = 'base pipe' pipe_type = 'relax_disp' pipe_name_r2eff = "%s_R2eff"%(pipe_name) - select_spin_index = range(0, 1) + select_spin_index = list(range(0, 1)) self.setup_sod1wt_t25(pipe_name=pipe_name, pipe_type=pipe_type, pipe_name_r2eff=pipe_name_r2eff, select_spin_index=select_spin_index) # Define replicated @@ -4923,7 +4923,7 @@ pipe_name = 'base pipe' pipe_type = 'relax_disp' pipe_name_r2eff = "%s_R2eff"%(pipe_name) - select_spin_index = range(0, 2) + select_spin_index = list(range(0, 2)) self.setup_sod1wt_t25(pipe_name=pipe_name, pipe_type=pipe_type, pipe_name_r2eff=pipe_name_r2eff, select_spin_index=select_spin_index) # Generate r20 key. @@ -5091,7 +5091,7 @@ pipe_name = 'base pipe' pipe_type = 'relax_disp' pipe_name_r2eff = "%s_R2eff"%(pipe_name) - select_spin_index = range(0, 2) + select_spin_index = list(range(0, 2)) self.setup_sod1wt_t25(pipe_name=pipe_name, pipe_type=pipe_type, pipe_name_r2eff=pipe_name_r2eff, select_spin_index=select_spin_index) # Generate r20 key.