#NEWLINE# def get_options( cls ) : #NEWLINE# #INDENT# 'Get argparse options for class, `cls`\n\n    Look for class level attributes of type option and\n    convert them into the arguments  necessary for calling\n    parser.add_argument().\n\n    Arguments:\n        subclass of VTask or Vservice - `cls`\n\n    Returns:\n        list(namedtuple) -\n            .opt - namedtuple\n                   .args - list of argument string names\n                          (e.g. [\'--help\', \'-h\'])\n                   .kwargs - dict of kwargs for add_argument()\n                          (e.g. default=False, action=\'store_true\' etc)\n            .regfunc - callable that takes the ArgumentParser as an argument\n                       and adds the option to it.\n                       (e.g. "foo.regfunc(ap)" registers the foo option on ap)\n    ' #NEWLINE# ret = [ ] #NEWLINE# for k in dir ( cls ) : #NEWLINE# #INDENT# v = getattr ( cls , k ) #NEWLINE# preparefunc = getattr ( v , '_prepareForArgumentParser' , None ) #NEWLINE# if ( not preparefunc ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# opt = preparefunc ( cls ) #NEWLINE# regfunc = partial ( getattr ( v , '_addToArgumentParser' ) , opt ) #NEWLINE# ret . append ( _OptRegFunc ( opt , regfunc ) ) #NEWLINE# #UNINDENT# return ret