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:
@ -1,17 +1,19 @@
|
||||
# simple test of gnu tool
|
||||
# creates tmp.eps
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
g = gnu()
|
||||
|
||||
g("plot sin(x) with lines")
|
||||
|
||||
a = range(10)
|
||||
a = list(range(10))
|
||||
b = [3,6,2,5,7,3,6,5,3,1]
|
||||
|
||||
g.plot(a)
|
||||
g.plot(a,b)
|
||||
g.plot(a,b,b,a)
|
||||
g.mplot(0,10,2,"tmp",a,b)
|
||||
g.mplot(2,10,2,"tmp",a,b)
|
||||
|
||||
g.export("tmp.gnu",a,b)
|
||||
|
||||
@ -30,4 +32,4 @@ g.ylog()
|
||||
|
||||
g.save("tmp")
|
||||
|
||||
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