1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
Description: Use 2to3 to convert Python2 script to Python3
Author: Andreas Tille <tille@debian.org>
Last-Update: 2021-09-23
---
--- a/data/Amber/converter/parmConverter.py
+++ b/data/Amber/converter/parmConverter.py
@@ -1,16 +1,16 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
from amberparser import *
def printUsage():
- print "\nUsage: ./parmConvert.py -i filename [-m file1 .. fileN] [-o output_file]\n"
- print "paramConvert accepts the following parameters:"
- print "\t--help Show this help and exit."
- print "\t-p,--parm filename The pram*.dat file which should be processed"
- print "\t-i,--in file1, .. , fileN The .in files that should be processed"
- print "\t-m,--mod file1 .. fileN A list of frcmod files"
+ print("\nUsage: ./parmConvert.py -i filename [-m file1 .. fileN] [-o output_file]\n")
+ print("paramConvert accepts the following parameters:")
+ print("\t--help Show this help and exit.")
+ print("\t-p,--parm filename The pram*.dat file which should be processed")
+ print("\t-i,--in file1, .. , fileN The .in files that should be processed")
+ print("\t-m,--mod file1 .. fileN A list of frcmod files")
inputFile=""
@@ -44,13 +44,13 @@ while i < len(sys.argv):
i += 1
modFiles=sys.argv[start:i]
else:
- print "Unknown parameter " + sys.argv[i]
+ print("Unknown parameter " + sys.argv[i])
printUsage()
exit(-1)
i += 1
if inputFile == "":
- print "You must specify an input file!"
+ print("You must specify an input file!")
printUsage()
exit(-1)
@@ -66,7 +66,7 @@ if outputFile == "":
try:
output = open(outputFile, "w")
except:
- print "Could not open " + outputFile + " for writing"
+ print("Could not open " + outputFile + " for writing")
exit(-1)
#line = input.readline()
|