mirror of
https://github.com/ParticulateFlow/LPP.git
synced 2025-12-08 06:37:46 +00:00
python 3 compatibility for examples/*.py files
add from __future__ import print statement -> print() function xrange -> range map() -> list(map()) range() -> list(range()) StandardError -> Exception
This commit is contained in:
@ -27,12 +27,12 @@ d.set("$xyz = $x + $y + $z")
|
||||
d.spread("x",100,"color")
|
||||
d.clone(0,"color")
|
||||
|
||||
print "Time",d.time()
|
||||
print("Time",d.time())
|
||||
color = d.atom(1,"color")
|
||||
print "Color of atom 1",color
|
||||
print("Color of atom 1",color)
|
||||
d.aselect.test("$id <= 10")
|
||||
color = d.vecs(1000,"color")
|
||||
print "Color of 1st 10 atoms in step 1000",color
|
||||
print("Color of 1st 10 atoms in step 1000",color)
|
||||
|
||||
d.atype = "color"
|
||||
|
||||
@ -42,13 +42,13 @@ while 1:
|
||||
if flag == -1: break
|
||||
time,box,atoms,bonds,tris,lines = d.viz(index)
|
||||
colors = [atom[1] for atom in atoms]
|
||||
print time,colors
|
||||
print(time,colors)
|
||||
|
||||
d = dump("files/dump.peptide.*",0)
|
||||
while 1:
|
||||
time = d.next()
|
||||
if time < 0: break
|
||||
|
||||
print "Incrementally read snaps =",d.nsnaps
|
||||
print("Incrementally read snaps =",d.nsnaps)
|
||||
|
||||
print "all done ... type CTRL-D to exit Pizza.py"
|
||||
print("all done ... type CTRL-D to exit Pizza.py")
|
||||
|
||||
Reference in New Issue
Block a user