包含和运行可调用对象
项目描述
使用方法
some_module.py:
def some_func(arg='World'):
print('Hello {}'.format(arg))
some_else_module.py:
from includer import include
include('some_module.some_func', arg='ZZZ')
IncluderMixin
混合 include 方法用于对象。行为类似于 Configurator.include。请参阅测试以了解其用法。
这对于命令式应用程序配置非常有用。
测试
$ pip install pytest
$ py.test tests -v
项目详情
关闭
includer-1.0.2.tar.bz2的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | ffad2929dbad93e5d70359bd1d5fd310e341472a427564f788c8a82fc5006923 |
|
MD5 | 2b0933c98956de88e20437b040fcdcb6 |
|
BLAKE2b-256 | 4d3fee65f1f273d70dd06b1702da559732159993ead92ab9a2c79f2bd9452b5f |