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:
@ -2,6 +2,8 @@
|
||||
# requires files/dump.kinase
|
||||
# creates tmp*.png
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
d = dump("files/dump.kinase")
|
||||
r = raster(d)
|
||||
|
||||
@ -10,7 +12,7 @@ r.rotate(60,130)
|
||||
r.box(1)
|
||||
r.file = "tmp"
|
||||
|
||||
print "kill image window when ready to contine ..."
|
||||
print("kill image window when ready to contine ...")
|
||||
r.show(0)
|
||||
r.all()
|
||||
a1 = animate("tmp0*png")
|
||||
@ -18,14 +20,14 @@ a1 = animate("tmp0*png")
|
||||
from vizinfo import colors
|
||||
|
||||
r.acol([1,4,6,8,9],["gray","red","blue","green","yellow"])
|
||||
r.arad(range(9),0.3)
|
||||
r.arad(list(range(9)),0.3)
|
||||
r.label(0.2,0.4,'h',15,"red","test label #1")
|
||||
r.label(-0.2,-0.4,'h',15,"yellow","test label #2")
|
||||
|
||||
print "kill image window when ready to contine ..."
|
||||
print("kill image window when ready to contine ...")
|
||||
r.show(0)
|
||||
r.pan(60,130,1,60,30,0.5)
|
||||
r.all(0,10,0)
|
||||
a2 = animate("tmp0*png")
|
||||
|
||||
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