def arg_parser(argv, globals):
 doc = globals['__doc__']
 (description, epilog) = doc.split('\n', 1)
 parser = argparse.ArgumentParser(description=description, epilog=epilog, formatter_class=argparse.RawTextHelpFormatter)
 return parser

def arg_parser ( argv , globals ) : doc = globals [ '__doc__' ] ( description , epilog ) = doc . split ( '\n' , 1 ) parser = argparse . ArgumentParser ( description = description , epilog = epilog , formatter_class = argparse . RawTextHelpFormatter ) return parser
build an argparser for this cli tool .