def getHachoirOptions(parser):
 def setLogFilename(*args):
  log.setFilename(args[2])
 common = OptionGroup(parser, _('Hachoir library'), 'Configure Hachoir library')
 common.add_option('--verbose', help=_('Verbose mode'), default=False, action='store_true')
 common.add_option('--log', help=_('Write log in a file'), type='string', action='callback', callback=setLogFilename)
 common.add_option('--quiet', help=_("Quiet mode (don't display warning)"), default=False, action='store_true')
 common.add_option('--debug', help=_('Debug mode'), default=False, action='store_true')
 return common

def getHachoirOptions ( parser ) : def setLogFilename ( * args ) : log . setFilename ( args [ 2 ] ) common = OptionGroup ( parser , _ ( 'Hachoir library' ) , 'Configure Hachoir library' ) common . add_option ( '--verbose' , help = _ ( 'Verbose mode' ) , default = False , action = 'store_true' ) common . add_option ( '--log' , help = _ ( 'Write log in a file' ) , type = 'string' , action = 'callback' , callback = setLogFilename ) common . add_option ( '--quiet' , help = _ ( "Quiet mode (don't display warning)" ) , default = False , action = 'store_true' ) common . add_option ( '--debug' , help = _ ( 'Debug mode' ) , default = False , action = 'store_true' ) return common
create an option group of hachoir library options .