本文整理汇总了Python中b3.plugins.admin.AdminPlugin._commands方法的典型用法代码示例。如果您正苦于以下问题:Python AdminPlugin._commands方法的具体用法?Python AdminPlugin._commands怎么用?Python AdminPlugin._commands使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类b3.plugins.admin.AdminPlugin
的用法示例。
在下文中一共展示了AdminPlugin._commands方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: console
# 需要导入模块: from b3.plugins.admin import AdminPlugin [as 别名]
# 或者: from b3.plugins.admin.AdminPlugin import _commands [as 别名]
def console():
with logging_disabled():
from b3.fake import FakeConsole
fake_console = FakeConsole('@b3/conf/b3.distribution.xml')
# load the admin plugin
with logging_disabled():
admin_plugin = AdminPlugin(fake_console, '@b3/conf/plugin_admin.ini')
admin_plugin._commands = {} # work around known bug in the Admin plugin which makes the _command property shared between all instances
admin_plugin.onStartup()
# make sure the admin plugin obtained by other plugins is our admin plugin
when(fake_console).getPlugin('admin').thenReturn(admin_plugin)
return fake_console