plugins/__init__.py
author greg
Thu, 21 Aug 2008 10:35:12 +0200
changeset 206 6b4d58363b80
parent 106 9810689febb0
permissions -rw-r--r--
fix bug in plugger.py to get URI_Location
add ip authorized in beremiz_service.py
10
2aff8e8cd456 Plugin skeleton base - python package
etisserant
parents:
diff changeset
     1
from os import listdir, path
2aff8e8cd456 Plugin skeleton base - python package
etisserant
parents:
diff changeset
     2
12
a1f9e514f708 plugin framework organization being defined
etisserant
parents: 11
diff changeset
     3
_base_path = path.split(__file__)[0]
10
2aff8e8cd456 Plugin skeleton base - python package
etisserant
parents:
diff changeset
     4
83
ad4dafe7bfee Bugs with windows fixed
lbessard
parents: 17
diff changeset
     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("__")]
106
9810689febb0 Added plugins creation helpstrings, changed GUI layout (more compact), solved staticbitmap issues on win32, re-designed some icons...
etisserant
parents: 83
diff changeset
     6
9810689febb0 Added plugins creation helpstrings, changed GUI layout (more compact), solved staticbitmap issues on win32, re-designed some icons...
etisserant
parents: 83
diff changeset
     7
helps = []
9810689febb0 Added plugins creation helpstrings, changed GUI layout (more compact), solved staticbitmap issues on win32, re-designed some icons...
etisserant
parents: 83
diff changeset
     8
for name in __all__:
9810689febb0 Added plugins creation helpstrings, changed GUI layout (more compact), solved staticbitmap issues on win32, re-designed some icons...
etisserant
parents: 83
diff changeset
     9
    helpfilename = path.join(_base_path, name, "README")
9810689febb0 Added plugins creation helpstrings, changed GUI layout (more compact), solved staticbitmap issues on win32, re-designed some icons...
etisserant
parents: 83
diff changeset
    10
    if path.isfile(helpfilename):
9810689febb0 Added plugins creation helpstrings, changed GUI layout (more compact), solved staticbitmap issues on win32, re-designed some icons...
etisserant
parents: 83
diff changeset
    11
        helps.append(open(helpfilename).readline().strip())
9810689febb0 Added plugins creation helpstrings, changed GUI layout (more compact), solved staticbitmap issues on win32, re-designed some icons...
etisserant
parents: 83
diff changeset
    12
    else:
9810689febb0 Added plugins creation helpstrings, changed GUI layout (more compact), solved staticbitmap issues on win32, re-designed some icons...
etisserant
parents: 83
diff changeset
    13
        helps.append(name)