plugins/__init__.py
changeset 106 9810689febb0
parent 83 ad4dafe7bfee
equal deleted inserted replaced
105:434aed8dc58d 106:9810689febb0
     1 from os import listdir, path
     1 from os import listdir, path
     2 
     2 
     3 _base_path = path.split(__file__)[0]
     3 _base_path = path.split(__file__)[0]
     4 
     4 
     5 __all__ = [name for name in listdir(_base_path) if path.isdir(path.join(_base_path, name)) and name.upper() != "CVS" or name.endswith(".py") and not name.startswith("__")]
     5 __all__ = [name for name in listdir(_base_path) if path.isdir(path.join(_base_path, name)) and name.upper() != "CVS" or name.endswith(".py") and not name.startswith("__")]
       
     6 
       
     7 helps = []
       
     8 for name in __all__:
       
     9     helpfilename = path.join(_base_path, name, "README")
       
    10     if path.isfile(helpfilename):
       
    11         helps.append(open(helpfilename).readline().strip())
       
    12     else:
       
    13         helps.append(name)