python 3 compatibility for scripts/*.py files

This commit is contained in:
danielque
2023-08-10 13:37:14 +02:00
parent cf710bcb9e
commit d4f5ea374a
16 changed files with 177 additions and 179 deletions

View File

@ -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)