def __init__(self, global_conf,
                 directory, base_python_name,
                 index_names=NoDefault,
                 hide_extensions=NoDefault,
                 ignore_extensions=NoDefault,
                 constructors=None,
                 **constructor_conf):
        if global_conf:
            import warnings
            warnings.warn(
                'The global_conf argument to URLParser is deprecated; '
                'either pass in None or {}, or use make_url_parser',
                DeprecationWarning)
        else:
            global_conf = {}
        if os.path.sep != '/':
            directory = directory.replace(os.path.sep, '/')
        self.directory = directory
        self.base_python_name = base_python_name
        # This logic here should be deprecated since it is in
        # make_url_parser
        if index_names is NoDefault:
            index_names = global_conf.get(
                'index_names', ('index', 'Index', 'main', 'Main'))
        self.index_names = converters.aslist(index_names)
        if hide_extensions is NoDefault:
            hide_extensions = global_conf.get(
                'hide_extensions', ('.pyc', '.bak', '.py~', '.pyo'))
        self.hide_extensions = converters.aslist(hide_extensions)
        if ignore_extensions is NoDefault:
            ignore_extensions = global_conf.get(
                'ignore_extensions', ())
        self.ignore_extensions = converters.aslist(ignore_extensions)
        self.constructors = self.global_constructors.copy()
        if constructors:
            self.constructors.update(constructors)
        # @@: Should we also check the global options for constructors?
        for name, value in constructor_conf.items():
            if not name.startswith('constructor '):
                raise ValueError(
                    "Only extra configuration keys allowed are "
                    "'constructor .ext = import_expr'; you gave %r "
                    "(=%r)" % (name, value))
            ext = name[len('constructor '):].strip()
            if isinstance(value, (str, unicode)):
                value = import_string.eval_import(value)
            self.constructors[ext] = value
Create a URLParser object that looks at `directory`.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/urlparser.py/URLParser.__init__