def _getPlugIns(plugInType, debugInspection=None, showProgress=None):
if isinstance(debugInspection, types.IntType):
warnings.warn(
"int parameter for debugInspection is deprecated, pass None or "
"a function that takes a single argument instead.",
DeprecationWarning, 3
)
if isinstance(showProgress, types.IntType):
warnings.warn(
"int parameter for showProgress is deprecated, pass None or "
"a function that takes a single argument instead.",
DeprecationWarning, 3
)
debugInspection, showProgress = _prepCallbacks(debugInspection, showProgress)
firstHalf = secondHalf = lambda x: None
if showProgress:
firstHalf = lambda x: showProgress(x / 2.0)
secondHalf = lambda x: showProgress(x / 2.0 + 0.5)
tmlFiles = getPluginFileList(debugInspection, firstHalf)
if not tmlFiles:
return []
return loadPlugins(plugInType, tmlFiles, debugInspection, secondHalf)
评论列表
文章目录