示例#1
0
 def setUp(self):
     super(EnablePrettyLoggingTest, self).setUp()
     self.options = OptionParser()
     define_logging_options(self.options)
     self.logger = logging.Logger('webalchemy.tornado.test.log_test.EnablePrettyLoggingTest')
     self.logger.propagate = False
示例#2
0
    """
    return options.parse_command_line(args, final=final)


def parse_config_file(path, final=True):
    """Parses global options from a config file.

    See `OptionParser.parse_config_file`.
    """
    return options.parse_config_file(path, final=final)


def print_help(file=None):
    """Prints all the command line options to stderr (or another file).

    See `OptionParser.print_help`.
    """
    return options.print_help(file)


def add_parse_callback(callback):
    """Adds a parse callback, to be invoked when option parsing is done.

    See `OptionParser.add_parse_callback`
    """
    options.add_parse_callback(callback)


# Default options
define_logging_options(options)