From 224b7246891eac59568f35e9fb3aaafe794cdbdf Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 16 Jan 2013 10:30:17 +0100 Subject: scripts/csv2sto.py: Use print() as a function --- scripts/csv2sto.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts') 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") -- cgit v1.2.3-54-g00ecf