A simple plugin registration.
Definition at line 135 of file acmdlib.py.
◆ exists()
| python.acmdlib.Plugins.exists |
( |
| cls, |
|
|
| name ) |
Check if plugin exists
Definition at line 147 of file acmdlib.py.
148 """Check if plugin exists
149 """
150 return name in cls._plugins
151
bool exists(const std::string &filename)
does a file exist
◆ load()
| python.acmdlib.Plugins.load |
( |
| cls, |
|
|
| name ) |
Load given plugin and return it
Definition at line 153 of file acmdlib.py.
153 def load(cls, name):
154 """Load given plugin and return it
155 """
156 try:
157 return importlib.import_module(cls._plugins[name])
158 except Exception as err:
159 print(
"** could not load command [%s]:\n%s" % (name, err))
160
void print(char *figname, TCanvas *c1)
◆ loadAll()
| python.acmdlib.Plugins.loadAll |
( |
| cls | ) |
|
Load all plugins
Definition at line 162 of file acmdlib.py.
162 def loadAll(cls):
163 """Load all plugins
164 """
165 for k in cls._plugins.keys():
166 cls.load(k)
167
◆ register()
| python.acmdlib.Plugins.register |
( |
| cls, |
|
|
| name, |
|
|
| value ) |
Register plugin
Definition at line 141 of file acmdlib.py.
141 def register(cls, name, value):
142 """Register plugin
143 """
144 cls._plugins[name] = value
145
◆ _plugins
| dict python.acmdlib.Plugins._plugins = {} |
|
staticprotected |
The documentation for this class was generated from the following file: