def __init__(self, path, **kwargs):
self.recursive = kwargs.pop('<STR_LIT>', True)<EOL>super(DirectoryLocator, self).__init__(**kwargs)<EOL>path = os.path.abspath(path)<EOL>if not os.path.isdir(path):  <EOL><INDENT>raise DistlibException('<STR_LIT>' % path)<EOL><DEDENT>self.base_dir = path<EOL>
Initialise an instance.
:param path: The root of the directory tree to search.
:param kwargs: Passed to the superclass constructor,
               except for:
               * recursive - if True (the default), subdirectories are
                 recursed into. If False, only the top-level directory
                 is searched,