def parse_options(): """Support for command line options""" parser = optparse.OptionParser(version="%%prog %s" % get_version()) parser.add_option( "-v", "--verbose", action="count", dest="verbose", help=_("Show debug messages (-vv debugs uberwriter_lib also)")) (options, args) = parser.parse_args() set_up_logging(options) # print args return options, args
def do_command_line(self, command_line): """Support for command line options""" parser = argparse.ArgumentParser() parser.add_argument( "-v", "--verbose", action="count", dest="verbose", help=_("Show debug messages (-vv debugs uberwriter_lib also)")) parser.add_argument( "-e", "--experimental-features", help=_("Use experimental features"), action='store_true' ) (self.options, self.args) = parser.parse_known_args() set_up_logging(self.options) self.activate() return 0