扭曲的过程接口
txsh的Python项目详细描述
txsh是twisted processprotocol和 生成进程,允许您调用任何程序,就好像它是 一个函数和返回,用它的退出代码和输出来延迟。
fromtwisted.internetimportreactorfromtxshimportlsdefmy_callback(exc_info):print'Exit Code:',exc_info.statusprint'Output:',exc_info.stdoutprint'Errors:',exc_info.stderrreactor.stop()d=ls()d.addCallback(my_callback)reactor.run()