MCPcopy Index your code
hub / github.com/LabPy/lantz / __init__

Method __init__

lantz/foreign.py:180–198  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

178 LIBRARY_PREFIX = ''
179
180 def __init__(self, *args, **kwargs):
181 library_name = kwargs.pop('library_name', None)
182 super().__init__(*args, **kwargs)
183
184 folder = os.path.dirname(inspect.getfile(self.__class__))
185 for name in chain(iter_lib(library_name, folder), iter_lib(self.LIBRARY_NAME, folder)):
186 if name is None:
187 continue
188 self.log_debug('Trying to open library: {}'.format(name))
189 try:
190 self.lib = Library(name, self.LIBRARY_PREFIX, self._wrapper)
191 break
192 except OSError:
193 pass
194 else:
195 raise OSError('While instantiating {}: library not found'.format(self.__class__.__name__))
196
197 self.log_info('LibraryDriver created with {}', name)
198 self._add_types()
199
200
201 def _add_types(self):

Callers

nothing calls this directly

Calls 6

_add_typesMethod · 0.95
iter_libFunction · 0.85
LibraryClass · 0.85
log_debugMethod · 0.80
log_infoMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected