summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2013-01-16 10:30:17 +0100
committerTobias Klauser <tklauser@distanz.ch>2013-01-16 10:30:17 +0100
commit224b7246891eac59568f35e9fb3aaafe794cdbdf (patch)
tree7f5ca66e15212ac9c838d42910bac5b86a464941 /scripts
parent8efeeffa28bb186a4fe89c8df5a80b28518adf93 (diff)
scripts/csv2sto.py: Use print() as a function
Diffstat (limited to 'scripts')
-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")