diff options
Diffstat (limited to 'test/Fortran/fixture/myfortran.py')
-rw-r--r-- | test/Fortran/fixture/myfortran.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Fortran/fixture/myfortran.py b/test/Fortran/fixture/myfortran.py new file mode 100644 index 0000000..08d1489 --- /dev/null +++ b/test/Fortran/fixture/myfortran.py @@ -0,0 +1,14 @@ +import getopt +import sys +print(sys.argv) +comment = ('#' + sys.argv[1]).encode() +length = len(comment) +opts, args = getopt.getopt(sys.argv[2:], 'cf:o:K:') +for opt, arg in opts: + if opt == '-o': out = arg +infile = open(args[0], 'rb') +outfile = open(out, 'wb') +for l in infile.readlines(): + if l[:length] != comment: + outfile.write(l) +sys.exit(0) |