mirror of
https://github.com/ParticulateFlow/LPP.git
synced 2025-12-08 06:37:46 +00:00
python 3 compatibility for scripts/*.py files
This commit is contained in:
@ -14,17 +14,17 @@ import sys
|
||||
from plotview import plotview
|
||||
from gnu import gnu
|
||||
from matlab import matlab
|
||||
if not globals().has_key("argv"): argv = sys.argv
|
||||
if "argv" not in globals(): argv = sys.argv
|
||||
|
||||
# main script
|
||||
|
||||
if len(argv) != 3:
|
||||
raise StandardError, "Syntax: plot.py gnu/matlab file"
|
||||
raise Exception("Syntax: plot.py gnu/matlab file")
|
||||
|
||||
style = argv[1]
|
||||
file = argv[2]
|
||||
|
||||
v = vec(file)
|
||||
exec "plot = %s()" % style
|
||||
exec("plot = %s()" % style)
|
||||
p = plotview(v,plot)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user