Drake工作流语言的Python帮助程序
drakeutil的Python项目详细描述
使用Drake工作流简化python中的生活的实用程序。
安装
运行pip install drakeutil。
使用
对于工作流中的python步骤,请包含以下行:
from drakeutil import *
这将填充环境中的特殊变量族INPUT,OUTPUT。例如:
somefile.out <- somefile.in [python] from drakeutil import * with open(INPUT) as istream: with open(OUTPUT) as ostream: for l in istream: for word in l.split(): print >> ostream, word
将来我们可能会增加更多的助手。你能想到什么有用的吗?
更改日志
0.1.0
- 支持特殊的INPUT和OUTPUT环境变量系列
- 安装MySQLdb模块时提供mysql_cursor帮助程序