def main(args): parser = OptionParser() group = OptionGroup('flumotion', 'Flumotion options', option_list=[]) group.add_option('-v', '--verbose', action="store_true", dest="verbose", help="be verbose") group.add_option('', '--version', action="store_true", dest="version", default=False, help="show version information") parser.add_option_group(group) parser.add_option_group(gstoption.get_group()) options, args = parser.parse_args(args) if options.verbose: print 'Verbose mode' import gst if options.version: print sys.version, gst.version
def __init__(self, usage, description, domain): self.domain = domain BaseOP.__init__(self, usage=usage, description=description) if use_gst: try: import pygst pygst.require('0.10') import gstoption self.add_option_group(gstoption.get_group()) except ImportError: pass