67 """Python script with command line options which calls the Fortran 68 File Reader with the supplied filename(s) and outputs the reader's 69 representation of the code(s). 79 from iocbio.optparse_gui
import OptionParser
81 from optparse
import OptionParser
84 def runner(_, options, args):
85 """Call the Fortran File reader for each filename in args and print 88 :param options: command line argument information from the options \ 90 :type options: :py:class:`optparse.Values` 91 :param args: a list of Fortran filepaths 92 :type args: list of str 94 :raises NotImplementedError: if the task option is not set to \ 100 for filename
in args:
101 reader = FortranFileReader(filename)
102 if options.task ==
"show":
107 raise NotImplementedError(
108 "The task option '{0}' is invalid. Currently only " 109 "'show' is supported.".format(repr(options.task))
114 """Check input options then call the runner function.""" 115 parser = OptionParser()
116 set_read_options(parser)
117 options, args = parser.parse_args()
118 runner(parser, options, args)
121 if __name__ ==
"__main__":