From: W. Trevor King Date: Wed, 17 Apr 2013 23:34:30 +0000 (-0400) Subject: src/figures/script/pyfit: print -> print() X-Git-Tag: v1.0~292 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4d48e0d6bb2770ad75c55ce03420a01485df2352;p=thesis.git src/figures/script/pyfit: print -> print() --- diff --git a/src/figures/script/pyfit b/src/figures/script/pyfit index 69ffa23..032d926 100755 --- a/src/figures/script/pyfit +++ b/src/figures/script/pyfit @@ -23,9 +23,9 @@ def parse_modules(module_strings): >>> m = parse_modules(['math:sin,cos', 'sys']) >>> import math, sys >>> if m == {'sin':math.sin, 'cos':math.cos, 'sys':sys}: - ... print True + ... print(True) ... else: - ... print m + ... print(m) True """ ms = [] @@ -98,14 +98,14 @@ def fit(data, fn, initial_ps, _locals={}, verbose=False): if not hasattr(p, '__len__'): p = [p] # with only one param, leastsq doesn't return a list if verbose == True: - print "Fitted params:",p - print "Covariance mx:",cov - #print "Info:", info # too much information :p - print "mesg:", mesg + print('Fitted params: {}'.format(p)) + print('Covariance mx: {}'.format(cov)) + #print('Info: {}'.format(info)) # too much information :p + print('mesg: {}'.format(mesg)) if ier == 1 : - print "Solution converged" + print('Solution converged') else : - print "Solution did not converge" + print('Solution did not converge') return p @@ -166,4 +166,4 @@ ignored. assert len(params) == len(initial_ps) for i,p in enumerate(params): - print '%s: %g' % (_param_char(i), p) + print('{}: {}'.format(_param_char(i), p))