MCPcopy Create free account
hub / github.com/Image-Py/imagepy / extend_widgets

Function extend_widgets

imagepy/core/loader/loader.py:190–201  ·  view source on GitHub ↗
(path, lst, err)

Source from the content-addressed store, hash-verified

188 return (pg, subtree)
189
190def extend_widgets(path, lst, err):
191 rst = []
192 for i in lst:
193 try:
194 rpath = path.replace('/', '.').replace('\\','.')
195 #rpath = rpath[rpath.index('imagepy.'):]
196 plg = __import__('imagepy.'+rpath+'.'+i,'','',[''])
197 rst.append(plg.Plugin)
198 except Exception as e:
199 err.append((path, i, sys.exc_info()[1]))
200 for i in rst:WidgetsManager.add(i)
201 return rst
202
203def sort_widgets(catlog, lst):
204 rst = []

Callers 1

build_widgetsFunction · 0.85

Calls 2

appendMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected