def configure(self, options, config):
        Plugin.configure(self, options, config)

        # Do nothing if plugin not enabled
        if not self.enabled:
            return

        # Check that Django and twill libraries available in this system
        if self.enabled:
            for lib in ('Django', 'twill'):
                try:
                    __import__(lib.lower())
                except __HOLE__, e:
                    log.error('%s not available: %s' % (lib, e))
                    self.enabled = False
                    return

        # Get user defined options
        self.error_dir = options.error_dir
        self.settings = options.settings
        self.verbosity = options.verbosity
        self.test_match_re = config.testMatch

        # Try to load Django project settings
        self.load_settings(self.settings)

        # Make sure that ``TWILL_ERROR_DIR`` set to ``os.environ`` if needed
        if self.error_dir:
            os.environ['TWILL_ERROR_DIR'] = self.error_dir
dataset/ETHPy150Open playpauseandstop/tddspry/tddspry/noseplugins/djangoplugin.py/DjangoPlugin.configure