diff options
Diffstat (limited to 'gr-utils/modtool/templates/gr-newmod/python/howto/bindings/header_utils.py')
-rw-r--r-- | gr-utils/modtool/templates/gr-newmod/python/howto/bindings/header_utils.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gr-utils/modtool/templates/gr-newmod/python/howto/bindings/header_utils.py b/gr-utils/modtool/templates/gr-newmod/python/howto/bindings/header_utils.py index 2150a76a25..7c26fe022b 100644 --- a/gr-utils/modtool/templates/gr-newmod/python/howto/bindings/header_utils.py +++ b/gr-utils/modtool/templates/gr-newmod/python/howto/bindings/header_utils.py @@ -6,7 +6,7 @@ import re class PybindHeaderParser: def __init__(self, pathname): - with open(pathname,'r') as f: + with open(pathname, 'r') as f: self.file_txt = f.read() def get_flag_automatic(self): @@ -49,17 +49,19 @@ class PybindHeaderParser: return f'{self.get_flag_automatic()};{self.get_flag_pygccxml()};{self.get_header_filename()};{self.get_header_file_hash()};' - def argParse(): """Parses commandline args.""" - desc='Reads the parameters from the comment block in the pybind files' + desc = 'Reads the parameters from the comment block in the pybind files' parser = ArgumentParser(description=desc) - parser.add_argument("function", help="Operation to perform on comment block of pybind file", choices=["flag_auto","flag_pygccxml","header_filename","header_file_hash","all"]) - parser.add_argument("pathname", help="Pathname of pybind c++ file to read, e.g. blockname_python.cc") + parser.add_argument("function", help="Operation to perform on comment block of pybind file", choices=[ + "flag_auto", "flag_pygccxml", "header_filename", "header_file_hash", "all"]) + parser.add_argument( + "pathname", help="Pathname of pybind c++ file to read, e.g. blockname_python.cc") return parser.parse_args() + if __name__ == "__main__": # Parse command line options and set up doxyxml. args = argParse() |