包含并运行可调用项
includer的Python项目详细描述
用法
一些模块.py:
defsome_func(arg='World'):print('Hello {}'.format(arg))
其他模块.py:
fromincluderimportincludeinclude('some_module.some_func',arg='ZZZ')
< H2>包括Myxin < /H2>
对象的mixinclude方法。 像Configurator.include这样的行为。了解它见测试。
这对于命令式应用程序配置非常有用。
测试
$ pip install pytest $ py.test tests -v