mailr17874 - in /branches/frame_order_testing: ./ docs/latex/ extern/scientific_python/IO/ graphics/wizards/dipole_pair/ test_su...


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 16, 2012 - 22:25:
Author: bugman
Date: Tue Oct 16 22:25:24 2012
New Revision: 17874

URL: http://svn.gna.org/viewcvs/relax?rev=17874&view=rev
Log:
Merged revisions 17861-17866 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r17861 | bugman | 2012-10-16 14:55:24 +0200 (Tue, 16 Oct 2012) | 3 lines
  
  The python print statements in the user manual are now function calls to be 
Python 3 compatible.
........
  r17862 | bugman | 2012-10-16 14:56:56 +0200 (Tue, 16 Oct 2012) | 3 lines
  
  Another print statement to function Python 3 fix for the user manual.
........
  r17863 | bugman | 2012-10-16 14:58:50 +0200 (Tue, 16 Oct 2012) | 6 lines
  
  Python 3 fixes for the script for generating plots of magnetic field lines.
  
  The command used was:
  2to3 -w graphics/wizards/dipole_pair/VectorFieldPlot.py
........
  r17864 | bugman | 2012-10-16 15:01:03 +0200 (Tue, 16 Oct 2012) | 3 lines
  
  Python 3 fixes for non-used Python code - converted print statements to 
function calls.
........
  r17865 | bugman | 2012-10-16 15:02:16 +0200 (Tue, 16 Oct 2012) | 3 lines
  
  Python 3 fixes for one of the test data scripts - print statement with 
function call replacements.
........
  r17866 | bugman | 2012-10-16 15:07:07 +0200 (Tue, 16 Oct 2012) | 3 lines
  
  Removed a debugging printout.
........

Modified:
    branches/frame_order_testing/   (props changed)
    branches/frame_order_testing/docs/latex/intro.tex
    branches/frame_order_testing/docs/latex/model-free.tex
    branches/frame_order_testing/extern/scientific_python/IO/FortranFormat.py
    branches/frame_order_testing/extern/scientific_python/IO/PDB.py
    
branches/frame_order_testing/graphics/wizards/dipole_pair/VectorFieldPlot.py
    
branches/frame_order_testing/test_suite/shared_data/align_data/missing_data/generate_missing.py
    branches/frame_order_testing/test_suite/system_tests/angles.py

Propchange: branches/frame_order_testing/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Oct 16 22:25:24 2012
@@ -1,1 +1,1 @@
-/trunk:1-17859
+/trunk:1-17859,17861-17866

Modified: branches/frame_order_testing/docs/latex/intro.tex
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/docs/latex/intro.tex?rev=17874&r1=17873&r2=17874&view=diff
==============================================================================
--- branches/frame_order_testing/docs/latex/intro.tex (original)
+++ branches/frame_order_testing/docs/latex/intro.tex Tue Oct 16 22:25:24 2012
@@ -155,12 +155,12 @@
 
 This is the Python prompt which has been tailored specifically for relax.  
You will hence have full access, if desired, to the power of the 
Python\index{Python} programing language to manipulate your data.  You can 
for instance type
 
-\example{relax> print "Hello World"}
+\example{relax> print("Hello World")}
 
 the result being
 
 \begin{exampleenv}
-relax> print "Hello World" \\
+relax> print("Hello World") \\
 Hello World \\
 relax>
 \end{exampleenv}

Modified: branches/frame_order_testing/docs/latex/model-free.tex
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/docs/latex/model-free.tex?rev=17874&r1=17873&r2=17874&view=diff
==============================================================================
--- branches/frame_order_testing/docs/latex/model-free.tex (original)
+++ branches/frame_order_testing/docs/latex/model-free.tex Tue Oct 16 
22:25:24 2012
@@ -924,7 +924,7 @@
  \\
 \# Loop over the data pipe names. \\
 for name in pipes: \\
-\hspace*{4ex} print ``$\backslash$n$\backslash$n\# '' + name + `` \#'' \\
+\hspace*{4ex} print(``$\backslash$n$\backslash$n\# '' + name + `` \#'') \\
  \\
 \hspace*{4ex} \# Create the data pipe. \\
 \hspace*{4ex} pipe.create(name, `mf') \\

Modified: 
branches/frame_order_testing/extern/scientific_python/IO/FortranFormat.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/extern/scientific_python/IO/FortranFormat.py?rev=17874&r1=17873&r2=17874&view=diff
==============================================================================
--- branches/frame_order_testing/extern/scientific_python/IO/FortranFormat.py 
(original)
+++ branches/frame_order_testing/extern/scientific_python/IO/FortranFormat.py 
Tue Oct 16 22:25:24 2012
@@ -33,8 +33,8 @@
     >>>s = '   59999'
     >>>format = FortranFormat('2I4')
     >>>line = FortranLine(s, format)
-    >>>print line[0]
-    >>>print line[1]
+    >>>print(line[0])
+    >>>print(line[1])
 
   prints::
 
@@ -46,7 +46,7 @@
 
     >>>format = FortranFormat('2D15.5')
     >>>line = FortranLine([3.1415926, 2.71828], format)
-    >>>print str(line)
+    >>>print(str(line))
 
   prints::
 

Modified: branches/frame_order_testing/extern/scientific_python/IO/PDB.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/extern/scientific_python/IO/PDB.py?rev=17874&r1=17873&r2=17874&view=diff
==============================================================================
--- branches/frame_order_testing/extern/scientific_python/IO/PDB.py (original)
+++ branches/frame_order_testing/extern/scientific_python/IO/PDB.py Tue Oct 
16 22:25:24 2012
@@ -45,10 +45,10 @@
 Example::
 
   >>>conf = Structure('example.pdb')
-  >>>print conf
+  >>>print(conf)
   >>>for residue in conf.residues:
   >>>    for atom in residue:
-  >>>        print atom
+  >>>        print(atom)
 
 @undocumented: atom_format
 @undocumented: anisou_format

Modified: 
branches/frame_order_testing/graphics/wizards/dipole_pair/VectorFieldPlot.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/graphics/wizards/dipole_pair/VectorFieldPlot.py?rev=17874&r1=17873&r2=17874&view=diff
==============================================================================
--- 
branches/frame_order_testing/graphics/wizards/dipole_pair/VectorFieldPlot.py 
(original)
+++ 
branches/frame_order_testing/graphics/wizards/dipole_pair/VectorFieldPlot.py 
Tue Oct 16 22:25:24 2012
@@ -205,7 +205,7 @@
     def __get_arrowname(self, fillcolor='#000000'):
         if 'arrows' not in dir(self):
             self.arrows = {}
-        if fillcolor not in self.arrows.iterkeys():
+        if fillcolor not in iter(self.arrows.keys()):
             arrow = etree.SubElement(self.__get_defs(), 'path')
             self.arrows[fillcolor] = arrow
             arrow.set('id', 'arrow' + str(len(self.arrows)))
@@ -544,7 +544,7 @@
             obj = etree.SubElement(self.symbols, name)
         else:
             obj = etree.SubElement(group, name)
-        for i, j in params.iteritems():
+        for i, j in params.items():
             obj.set(str(i), str(j))
         return obj
  
@@ -561,7 +561,7 @@
         outfile.write(etree.tostring(self.svg, xml_declaration=True,
             pretty_print=True, encoding='utf-8'))
         outfile.close()
-        print 'image written to', filename + '.svg'
+        print('image written to', filename + '.svg')
  
  
  
@@ -606,7 +606,7 @@
         if v != None: d_near *= 1.3 - cosv(v, self.first_point - p)
         type_near = 'start'
         mon = []
-        for ptype, poles in self.field.elements.iteritems():
+        for ptype, poles in self.field.elements.items():
             if ptype not in ['monopoles', 'dipoles'] or len(poles) == 0:
                 continue
             for pole in poles:
@@ -679,7 +679,7 @@
                             (dpole * abs(cv) < xtol) and (l > 1e-3)):
                             # path is closed
                             nodes[-1]['v_out'] = None
-                            print 'closed at', pretty_vec(p)
+                            print('closed at', pretty_vec(p))
                             break
                         elif (h > 0.99 * dpole and (cv > 0.9 or
                             (cv > 0. and dpole * abs(sv) < ytol))):
@@ -755,7 +755,7 @@
                         # create a corner
                         # use second-order formulas instead of runge-kutta
                         p += hc * v2
-                        print 'corner at', pretty_vec(p)
+                        print('corner at', pretty_vec(p))
                         v = vnorm(2. * v2 - v)
                         
nodes.append({'p':p.copy(),'v_in':v*hc,'corner':True})
                         l += h
@@ -779,7 +779,7 @@
                         adif = angle_dif(a1, a0)
                         if (abs(adif) / (.8*hh)**2 > corner_limit or
                             abs(a0) + abs(a1) >= pi / 2.):
-                            print 'end edge at', pretty_vec(p)
+                            print('end edge at', pretty_vec(p))
                             # direction after corner changes again -> end 
line
                             nodes[-1]['v_out'] = None
                             break
@@ -829,7 +829,7 @@
                         h = vabs(nodes[-1]['p'] - p)
                         nodes[-2]['v_out'] = f(nodes[-2]['p']) * h
                         nodes[-1]['v_in'] = f(nodes[-1]['p']) * h
-                    print 'stopped at', pretty_vec(nodes[-1]['p'])
+                    print('stopped at', pretty_vec(nodes[-1]['p']))
                     break 
  
             # adapt step carefully
@@ -846,9 +846,9 @@
  
         nodes[-1]['v_out'] = None
         if i == maxn:
-            print maxn, 'integration steps exceeded at', pretty_vec(p)
+            print(maxn, 'integration steps exceeded at', pretty_vec(p))
         if l >= maxr:
-            print 'integration boundary', str(maxr), 'exceeded at', 
pretty_vec(p)
+            print('integration boundary', str(maxr), 'exceeded at', 
pretty_vec(p))
         return nodes
  
     def __is_loop(self, nodes, path_close_tol):
@@ -995,7 +995,7 @@
             if num_success > 2 and N < N_old: num_success = 2
             if num_success >= 3: break
             if num >= 25:
-                print 'polyline creation did not converge after', num, 
'tries!'
+                print('polyline creation did not converge after', num, 
'tries!')
                 break
             ratios = [ratio * N / n for ratio in ratios]
  
@@ -1114,7 +1114,7 @@
     '''
     def __init__ (self, elements={}):
         self.elements = {}
-        for name, params in elements.iteritems():
+        for name, params in elements.items():
             self.add_element(name, params)
  
     '''
@@ -1259,4 +1259,4 @@
  
 ### append your specific field creation here ###
 # see http://commons.wikimedia.org/wiki/File:VFPt_charges_plus_minus.svg for 
an example
-#print "individual image description code must be inserted at the end of 
this program's source code!"
+#print("individual image description code must be inserted at the end of 
this program's source code!")

Modified: 
branches/frame_order_testing/test_suite/shared_data/align_data/missing_data/generate_missing.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/shared_data/align_data/missing_data/generate_missing.py?rev=17874&r1=17873&r2=17874&view=diff
==============================================================================
--- 
branches/frame_order_testing/test_suite/shared_data/align_data/missing_data/generate_missing.py
 (original)
+++ 
branches/frame_order_testing/test_suite/shared_data/align_data/missing_data/generate_missing.py
 Tue Oct 16 22:25:24 2012
@@ -144,7 +144,7 @@
 
     # Loop over the interatomic data.
     for interatom in interatomic_loop():
-        print interatom.spin_id1, interatom.spin_id2
+        print(interatom.spin_id1, interatom.spin_id2)
         # Deselected containers.
         if not interatom.select:
             continue
@@ -161,7 +161,7 @@
             elif spin1._res_num == missing[i][j][0] and spin1.name == 
missing[i][j][1]:
                 skip = True
         if skip:
-            print "\tskip"
+            print("\tskip")
             continue
 
         # No vector.

Modified: branches/frame_order_testing/test_suite/system_tests/angles.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/system_tests/angles.py?rev=17874&r1=17873&r2=17874&view=diff
==============================================================================
--- branches/frame_order_testing/test_suite/system_tests/angles.py (original)
+++ branches/frame_order_testing/test_suite/system_tests/angles.py Tue Oct 16 
22:25:24 2012
@@ -66,7 +66,6 @@
 
         # Checks for the first 12 residues.
         for i in range(12):
-            print((cdp.mol[0].res[i].spin[0]))
             # Check the residue and spin info.
             self.assertEqual(cdp.mol[0].res[i].num, i+1)
             self.assertEqual(cdp.mol[0].res[i].name, res_name[i])




Related Messages


Powered by MHonArc, Updated Tue Oct 16 22:40:03 2012