summaryrefslogtreecommitdiff
path: root/scripts/csv2sto.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/csv2sto.py')
-rwxr-xr-xscripts/csv2sto.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/csv2sto.py b/scripts/csv2sto.py
index 3a1b363..381e2ae 100755
--- a/scripts/csv2sto.py
+++ b/scripts/csv2sto.py
@@ -59,7 +59,7 @@ def main():
fs_csv = args[0:-1]
for f_csv in fs_csv:
if not os.path.exists(f_csv):
- print "Error: CSV file %s does not exist" % f_csv
+ print("Error: CSV file {} does not exist".format(f_csv))
sys.exit(-1)
if muscles and len(muscles) != len(fs_csv):
@@ -68,7 +68,7 @@ def main():
f_sto = args[-1]
if not overwrite and os.path.exists(f_sto):
- print "Error: STO file %s already exists" % f_sto
+ print("Error: STO file {} already exists".format(f_sto))
sys.exit(-1)
# determine number of columns and rows
@@ -83,19 +83,19 @@ def main():
if tot_nRows == 0:
tot_nRows = nRows
elif tot_nRows != nRows:
- print "Error: Number of rows in CSV files do not match"
+ print("Error: Number of rows in CSV files do not match")
sys.exit(-1)
if tot_nCols == 0:
tot_nCols = nCols
elif tot_nCols != nCols:
- print "Error: Number of columns in CSV files do not match"
+ print("Error: Number of columns in CSV files do not match")
sys.exit(-1)
fd.close()
- print "Writing sto file %s with name %s" % (f_sto, name)
+ print("Writing sto file {} with name {}".format(f_sto, name))
if maxtime != DEFAULT_MAXTIME:
- print "Scaling to maxtime %f" % maxtime
+ print("Scaling to maxtime {}".format(maxtime))
fd_sto = open(f_sto, 'w')
fd_sto.write(name + "\n")