diff -rup pymol-open-source-2.3.0.orig/test/headerTest.py pymol-open-source-2.3.0/test/headerTest.py
--- pymol-open-source-2.3.0.orig/test/headerTest.py 2019-02-11 14:08:10.000000000 +0000
+++ pymol-open-source-2.3.0/test/headerTest.py 2019-12-31 00:58:56.747925023 +0000
@@ -7,28 +7,28 @@ import os
if len(sys.argv)>1:
p = sys.argv[1:]
else:
- print "Usage: pymol -cq ./headerTest.py -- MTZTestDirectory"
+ print("Usage: pymol -cq ./headerTest.py -- MTZTestDirectory")
sys.exit(1)
for curPath in p:
- print "Processing MTZ files in path: '%s'" % curPath
+ print("Processing MTZ files in path: '%s'" % curPath)
l = glob.glob(curPath + os.sep + "*.mtz")
d = {}
for mtzFile in l:
- print "Processing %s." % mtzFile
+ print("Processing %s." % mtzFile)
d[mtzFile] = headering.MTZHeader(mtzFile)
for f in d:
- print "Columns for file '%s':" % f
+ print("Columns for file '%s':" % f)
pprint.pprint(d[f].getColumns())
- print ""
+ print("")
for f in d:
- print "Columns of type W ofr file '%s':" % f
+ print("Columns of type W ofr file '%s':" % f)
pprint.pprint(d[f].getColumnsOfType("W"))
- print ""
+ print("")
diff -rup pymol-open-source-2.3.0.orig/test/inp/B01.py pymol-open-source-2.3.0/test/inp/B01.py
--- pymol-open-source-2.3.0.orig/test/inp/B01.py 2019-02-11 14:08:10.000000000 +0000
+++ pymol-open-source-2.3.0/test/inp/B01.py 2019-12-31 01:05:14.326755274 +0000
@@ -50,7 +50,7 @@ def load():
try:
cmd.set("suspend_updates","1")
cmd.delete('pdb')
- print file,last1,last2,c,"of",l
+ print(file,last1,last2,c,"of",l)
last2 = last1
last1 = file
cmd.load(file,'pdb')
diff -rup pymol-open-source-2.3.0.orig/test/inp/B02.py pymol-open-source-2.3.0/test/inp/B02.py
--- pymol-open-source-2.3.0.orig/test/inp/B02.py 2019-02-11 14:08:10.000000000 +0000
+++ pymol-open-source-2.3.0/test/inp/B02.py 2019-12-31 01:06:50.254201459 +0000
@@ -26,7 +26,7 @@ def load():
# list.pop(0)
for file in list:
try:
- print file
+ print(file)
cmd.delete('pdb')
cmd.load(file,'pdb')
cmd.orient('pdb')
diff -rup pymol-open-source-2.3.0.orig/test/inp/B04.py pymol-open-source-2.3.0/test/inp/B04.py
--- pymol-open-source-2.3.0.orig/test/inp/B04.py 2019-02-11 14:08:10.000000000 +0000
+++ pymol-open-source-2.3.0/test/inp/B04.py 2019-12-31 01:07:35.787938573 +0000
@@ -42,15 +42,15 @@ def load():
l=f.readlines()
f.close()
if len(l):
- print
+ print()
for a in l:
- print a,
+ print(a,)
# save it so we have something to look at...
os.system("/bin/cp -f %s %s_s"%(cmp_file,cmp_file))
os.system("/bin/cp -f %s %s_s"%(ref_file,ref_file))
os.system("/bin/cp -f %s %s_src"%(out_file,cmp_file))
os.system("/bin/cp -f %s %s_src"%(file,ref_file))
- print file
+ print(file)
else:
sys.__stdout__.write(".")
sys.__stdout__.flush()
diff -rup pymol-open-source-2.3.0.orig/test/inp/B06.py pymol-open-source-2.3.0/test/inp/B06.py
--- pymol-open-source-2.3.0.orig/test/inp/B06.py 2019-02-11 14:08:10.000000000 +0000
+++ pymol-open-source-2.3.0/test/inp/B06.py 2019-12-31 01:00:00.870564958 +0000
@@ -26,7 +26,7 @@ def load():
# while list[0]!="pdb/f8/pdb1f8u":
# list.pop(0)
for file in list:
- print file
+ print(file)
cmd.delete('pdb')
cmd.load(file,'pdb')
cmd.orient('pdb')
diff -rup pymol-open-source-2.3.0.orig/test/inp/B07.py pymol-open-source-2.3.0/test/inp/B07.py
--- pymol-open-source-2.3.0.orig/test/inp/B07.py 2019-02-11 14:08:10.000000000 +0000
+++ pymol-open-source-2.3.0/test/inp/B07.py 2019-12-31 01:08:26.179647638 +0000
@@ -33,10 +33,10 @@ def load():
idx = ch.insert_model(model)
ch.pattern_orient_bonds(idx)
- print " %5d"%cmd.count_atoms(),"%5d"%len(ch.pattern_get_string(idx)),
+ print(" %5d"%cmd.count_atoms(),"%5d"%len(ch.pattern_get_string(idx)),)
ch.pattern_detect_chirality(idx)
pat = ch.pattern_get_string(idx)
- print "%5d"%len(pat),pat[0:22]+"..."+pat[-10:]
+ print("%5d"%len(pat),pat[0:22]+"..."+pat[-10:])
cmd.feedback('disable','symmetry objectmolecule executive','everything')
load()
diff -rup pymol-open-source-2.3.0.orig/test/inp/C1050fitting.py pymol-open-source-2.3.0/test/inp/C1050fitting.py
--- pymol-open-source-2.3.0.orig/test/inp/C1050fitting.py 2019-02-11 14:08:10.000000000 +0000
+++ pymol-open-source-2.3.0/test/inp/C1050fitting.py 2019-12-31 01:09:57.017123219 +0000
@@ -5,11 +5,11 @@ from pymol import cmd
from random import random,seed
-print "BEGIN-LOG"
+print("BEGIN-LOG")
seed(123)
-print "the 1st random number should be %8.3f\notherwise the rest of the test is meaningless...\n"%pymol.random()
+print("the 1st random number should be %8.3f\notherwise the rest of the test is meaningless...\n"%pymol.random())
pymol.random = random
@@ -23,29 +23,29 @@ for a in xrange(1,11):
cmd.frame(1)
-print "%8.3f"%cmd.fit("ref","trg")
+print("%8.3f"%cmd.fit("ref","trg"))
# asdf
for a in xrange(1,14):
- print a,
- print "%8.3f"%cmd.fit("ref and resi %d"%a,"trg"),
- print "%8.3f"%cmd.rms("ref","trg"),
- print "%8.3f"%cmd.rms_cur("ref","trg")
+ print(a,)
+ print("%8.3f"%cmd.fit("ref and resi %d"%a,"trg"),)
+ print("%8.3f"%cmd.rms("ref","trg"),)
+ print("%8.3f"%cmd.rms_cur("ref","trg"))
cmd.frame(10)
-print "%8.3f"%cmd.fit("ref","trg")
+print("%8.3f"%cmd.fit("ref","trg"))
for a in xrange(1,14):
- print a,
- print "%8.3f"%cmd.fit("ref and resi %d"%a,"trg"),
- print "%8.3f"%cmd.rms("ref","trg"),
- print "%8.3f"%cmd.rms_cur("ref","trg")
+ print(a,)
+ print("%8.3f"%cmd.fit("ref and resi %d"%a,"trg"),)
+ print("%8.3f"%cmd.rms("ref","trg"),)
+ print("%8.3f"%cmd.rms_cur("ref","trg"))
a = 1
-print "%8.3f"%cmd.fit("ref","trg")
+print("%8.3f"%cmd.fit("ref","trg"))
for b in xrange(1,11):
cmd._dump_floats(cmd.intra_fit("trg and resi %d"%a,b))
cmd._dump_floats(cmd.intra_rms("trg",b))
@@ -56,7 +56,7 @@ cmd.do("intra_fit (trg and resi 1),10")
cmd.do("intra_rms (trg),10")
cmd.do("intra_rms_cur (trg),10")
-print "END-LOG"
+print("END-LOG")
diff -rup pymol-open-source-2.3.0.orig/test/inp/C1060controlling.py pymol-open-source-2.3.0/test/inp/C1060controlling.py
--- pymol-open-source-2.3.0.orig/test/inp/C1060controlling.py 2019-02-11 14:08:10.000000000 +0000
+++ pymol-open-source-2.3.0/test/inp/C1060controlling.py 2019-12-31 01:12:25.376266687 +0000
@@ -2,30 +2,30 @@
from pymol import cmd
-print "BEGIN-LOG"
+print("BEGIN-LOG")
-print cmd.set_key('F1',lambda :cmd.turn('x',10))
-print cmd.set_key('F12',lambda :cmd.turn('x',10))
+print(cmd.set_key('F1',lambda :cmd.turn('x',10)))
+print(cmd.set_key('F12',lambda :cmd.turn('x',10)))
-print cmd.set_key('left',lambda :cmd.turn('x',10))
-print cmd.set_key('right',lambda :cmd.turn('x',10))
-print cmd.set_key('pgup',lambda :cmd.turn('x',10))
-print cmd.set_key('pgdn',lambda :cmd.turn('x',10))
-print cmd.set_key('home',lambda :cmd.turn('x',10))
-print cmd.set_key('insert',lambda :cmd.turn('x',10))
+print(cmd.set_key('left',lambda :cmd.turn('x',10)))
+print(cmd.set_key('right',lambda :cmd.turn('x',10)))
+print(cmd.set_key('pgup',lambda :cmd.turn('x',10)))
+print(cmd.set_key('pgdn',lambda :cmd.turn('x',10)))
+print(cmd.set_key('home',lambda :cmd.turn('x',10)))
+print(cmd.set_key('insert',lambda :cmd.turn('x',10)))
-print cmd.set_key('ALT-A',lambda :cmd.turn('y',10))
+print(cmd.set_key('ALT-A',lambda :cmd.turn('y',10)))
-print cmd.set_key('CTRL-C',lambda :cmd.turn('z',10))
+print(cmd.set_key('CTRL-C',lambda :cmd.turn('z',10)))
-print cmd.set_key('SHFT-F1', lambda :cmd.turn('z',10))
+print(cmd.set_key('SHFT-F1', lambda :cmd.turn('z',10)))
-print cmd.set_key('ALT-F1', lambda :cmd.turn('y',10))
+print(cmd.set_key('ALT-F1', lambda :cmd.turn('y',10)))
-print cmd.set_key('CTRL-F8', lambda :cmd.move('x',1))
+print(cmd.set_key('CTRL-F8', lambda :cmd.move('x',1)))
-print "END-LOG"
+print("END-LOG")
diff -rup pymol-open-source-2.3.0.orig/test/inp/C1100do.py pymol-open-source-2.3.0/test/inp/C1100do.py
--- pymol-open-source-2.3.0.orig/test/inp/C1100do.py 2019-02-11 14:08:10.000000000 +0000
+++ pymol-open-source-2.3.0/test/inp/C1100do.py 2019-12-31 01:12:44.051158878 +0000
@@ -2,7 +2,7 @@
from pymol import cmd
-print "BEGIN-LOG"
+print("BEGIN-LOG")
cmd.do("""
load dat/pept.pdb
@@ -27,16 +27,16 @@ cmd.do('ray')
# see if when can embed Python blocks inside of PyMOL inside of Python
-cmd.do('for a in range(1,10):\\\n print a\\\n print a+10')
+cmd.do('for a in range(1,10):\\\n print (a)\\\n print (a+10)')
cmd.do(r"""
for a in range(11,21):\
- print a\
- print a+10
+ print (a)\
+ print (a+10)
""")
-print "END-LOG"
+print("END-LOG")
diff -rup pymol-open-source-2.3.0.orig/test/inp/C2000returns.py pymol-open-source-2.3.0/test/inp/C2000returns.py
--- pymol-open-source-2.3.0.orig/test/inp/C2000returns.py 2019-02-11 14:08:10.000000000 +0000
+++ pymol-open-source-2.3.0/test/inp/C2000returns.py 2019-12-31 01:14:11.048656595 +0000
@@ -1,6 +1,6 @@
# -c
-print "BEGIN-LOG"
+print("BEGIN-LOG")
import pymol
from pymol import cmd
@@ -8,18 +8,18 @@ from pymol import cmd
# need to do this for all supported file types because the load routines diverge...
def x(st):
- print st
+ print(st)
cmd.set("raise_exceptions",0)
valu = eval(st)
- print valu
+ print(valu)
if cmd.is_error(valu):
cmd.set("raise_exceptions",1)
try:
- print eval(st)
+ print(eval(st))
except pymol.CmdException:
- print "CmdException raised."
+ print("CmdException raised.")
except cmd.QuietException:
- print "QuietException raised."
+ print("QuietException raised.")
map(x,[
'cmd.load("dat/pept.pdb")' ,
@@ -55,12 +55,12 @@ map(x,[
cmd.delete("all")
cmd.load("dat/pept.pdb")
mdl = cmd.get_model("pept")
-print mdl.__class__
-print len(mdl.atom)
+print(mdl.__class__)
+print(len(mdl.atom))
mdl = cmd.get_model("none")
-print mdl.__class__
-print len(mdl.atom)
+print(mdl.__class__)
+print(len(mdl.atom))
map( x, [
'cmd.get_model("nonexistent")',
@@ -119,7 +119,7 @@ map( x, [
-print "END-LOG"
+print("END-LOG")
TODO="""
diff -rup pymol-open-source-2.3.0.orig/test/inp/T04.py pymol-open-source-2.3.0/test/inp/T04.py
--- pymol-open-source-2.3.0.orig/test/inp/T04.py 2019-02-11 14:08:10.000000000 +0000
+++ pymol-open-source-2.3.0/test/inp/T04.py 2019-12-31 01:00:30.116396114 +0000
@@ -34,7 +34,7 @@ def centers():
cmd.center("(resi %d)"%resi)
time.sleep(random.random()*0.30)
except:
- print "exception"
+ print("exception")
t = threading.Thread(target=centers)
t.setDaemon(1)
@@ -146,7 +146,7 @@ def carts():
time.sleep(random.random()*0.03)
except:
- print "exception"
+ print("exception")
t = threading.Thread(target=carts)
t.setDaemon(1)
diff -rup pymol-open-source-2.3.0.orig/test/win.py pymol-open-source-2.3.0/test/win.py
--- pymol-open-source-2.3.0.orig/test/win.py 2019-02-11 14:08:10.000000000 +0000
+++ pymol-open-source-2.3.0/test/win.py 2019-12-31 01:15:21.879273187 +0000
@@ -58,10 +58,10 @@ for test in tests:
tst = re.sub(r".*/|.*\\","",ifil) # get exact test name without suffix
tst = re.sub(r"\..*","",tst)
- print " run_tests: "+tst+"..."
+ print(" run_tests: "+tst+"...")
syscmd = cmmd+" -x -d pwd "+opt+" "+ifil+" > tmp.txt 2>&1"
- print syscmd
+ print(syscmd)
#os.system("c:\\pymolws\\pymol.exe")
os.system(syscmd)
# generate log file
@@ -94,10 +94,10 @@ for test in tests:
if (not lf) and not (lg):
break
if string.strip(lf)!=string.strip(lg):
- print "<",lf
- print ">",lg
+ print("<",lf)
+ print(">",lg)
-print "done"
+print("done")
time.sleep(360)
#