ATLAS Offline Software
Public Member Functions | Static Private Attributes | List of all members
python.acmdlib.Plugins Class Reference
Inheritance diagram for python.acmdlib.Plugins:
Collaboration diagram for python.acmdlib.Plugins:

Public Member Functions

def register (cls, name, value)
 
def exists (cls, name)
 
def load (cls, name)
 
def loadAll (cls)
 

Static Private Attributes

 _plugins
 

Detailed Description

A simple plugin registration.

Definition at line 137 of file acmdlib.py.

Member Function Documentation

◆ exists()

def python.acmdlib.Plugins.exists (   cls,
  name 
)
Check if plugin exists

Definition at line 149 of file acmdlib.py.

149  def exists(cls, name):
150  """Check if plugin exists
151  """
152  return name in cls._plugins
153 

◆ load()

def python.acmdlib.Plugins.load (   cls,
  name 
)
Load given plugin and return it

Definition at line 155 of file acmdlib.py.

155  def load(cls, name):
156  """Load given plugin and return it
157  """
158  try:
159  return importlib.import_module(cls._plugins[name])
160  except Exception as err:
161  print("** could not load command [%s]:\n%s" % (name, err))
162 

◆ loadAll()

def python.acmdlib.Plugins.loadAll (   cls)
Load all plugins

Definition at line 164 of file acmdlib.py.

164  def loadAll(cls):
165  """Load all plugins
166  """
167  for k in cls._plugins.keys():
168  cls.load(k)
169 

◆ register()

def python.acmdlib.Plugins.register (   cls,
  name,
  value 
)
Register plugin

Definition at line 143 of file acmdlib.py.

143  def register(cls, name, value):
144  """Register plugin
145  """
146  cls._plugins[name] = value
147 

Member Data Documentation

◆ _plugins

python.acmdlib.Plugins._plugins
staticprivate

Definition at line 140 of file acmdlib.py.


The documentation for this class was generated from the following file:
register
#define register
Definition: dictionary.h:21
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
python.root_pickle.load
def load(f, use_proxy=1, key=None)
Definition: root_pickle.py:476
python.dummyaccess.exists
def exists(filename)
Definition: dummyaccess.py:9