本文整理汇总了Python中arelle.PackageManager.removePackageModule方法的典型用法代码示例。如果您正苦于以下问题:Python PackageManager.removePackageModule方法的具体用法?Python PackageManager.removePackageModule怎么用?Python PackageManager.removePackageModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类arelle.PackageManager
的用法示例。
在下文中一共展示了PackageManager.removePackageModule方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: from arelle import PackageManager [as 别名]
# 或者: from arelle.PackageManager import removePackageModule [as 别名]
#.........这里部分代码省略.........
PluginManager.save(self)
if showPluginModules:
self.addToLog(_("Plug-in modules:"), messageCode="info")
for i, moduleItem in enumerate(sorted(PluginManager.pluginConfig.get("modules", {}).items())):
moduleInfo = moduleItem[1]
self.addToLog(_("Plug-in: {0}; author: {1}; version: {2}; status: {3}; date: {4}; description: {5}; license {6}.").format(
moduleItem[0], moduleInfo.get("author"), moduleInfo.get("version"), moduleInfo.get("status"),
moduleInfo.get("fileDate"), moduleInfo.get("description"), moduleInfo.get("license")),
messageCode="info", file=moduleInfo.get("moduleURL"))
if options.packages:
from arelle import PackageManager
savePackagesChanges = True
showPackages = False
for packageCmd in options.packages.split('|'):
cmd = packageCmd.strip()
if cmd == "show":
showPackages = True
elif cmd == "temp":
savePackagesChanges = False
elif cmd.startswith("+"):
packageInfo = PackageManager.addPackage(cmd[1:])
if packageInfo:
self.addToLog(_("Addition of package {0} successful.").format(packageInfo.get("name")),
messageCode="info", file=packageInfo.get("URL"))
else:
self.addToLog(_("Unable to load plug-in."), messageCode="info", file=cmd[1:])
elif cmd.startswith("~"):
if PackageManager.reloadPackageModule(cmd[1:]):
self.addToLog(_("Reload of package successful."), messageCode="info", file=cmd[1:])
else:
self.addToLog(_("Unable to reload package."), messageCode="info", file=cmd[1:])
elif cmd.startswith("-"):
if PackageManager.removePackageModule(cmd[1:]):
self.addToLog(_("Deletion of package successful."), messageCode="info", file=cmd[1:])
else:
self.addToLog(_("Unable to delete package."), messageCode="info", file=cmd[1:])
else: # assume it is a module or package
savePackagesChanges = False
packageInfo = PackageManager.addPackage(cmd)
if packageInfo:
self.addToLog(_("Activation of package {0} successful.").format(packageInfo.get("name")),
messageCode="info", file=packageInfo.get("URL"))
resetPlugins = True
else:
self.addToLog(_("Unable to load {0} as a package or {0} is not recognized as a command. ").format(cmd), messageCode="info", file=cmd)
if savePackagesChanges:
PackageManager.save(self)
if showPackages:
self.addToLog(_("Taxonomy packages:"), messageCode="info")
for packageInfo in PackageManager.orderedPackagesConfig()["packages"]:
self.addToLog(_("Package: {0}; version: {1}; status: {2}; date: {3}; description: {4}.").format(
packageInfo.get("name"), packageInfo.get("version"), packageInfo.get("status"),
packageInfo.get("fileDate"), packageInfo.get("description")),
messageCode="info", file=packageInfo.get("URL"))
# run utility command line options that don't depend on entrypoint Files
hasUtilityPlugin = False
for pluginXbrlMethod in pluginClassMethods("CntlrCmdLine.Utility.Run"):
hasUtilityPlugin = True
pluginXbrlMethod(self, options)
# if no entrypointFile is applicable, quit now
if options.proxy or options.plugins or hasUtilityPlugin:
if not options.entrypointFile:
return True # success