Allow modules to be categorized, and also sort them when generating the documentation.

This commit is contained in:
Michael DeHaan 2013-04-28 15:03:45 -04:00
parent f46bdb6343
commit 391fb98ee2
87 changed files with 118 additions and 67 deletions

View file

@ -92,8 +92,15 @@ class PluginLoader(object):
ret += self._extra_dirs
for basedir in _basedirs:
fullpath = os.path.join(basedir, self.subdir)
if fullpath not in ret:
ret.append(fullpath)
if os.path.isdir(fullpath):
files = glob.glob("%s/*" % fullpath)
for file in files:
if os.path.isdir(file):
ret.append(file)
else:
if fullpath not in ret:
ret.append(fullpath)
ret += self.config.split(os.pathsep)
ret += self._get_package_path()