【发布时间】:2016-08-30 15:22:28
【问题描述】:
我是twisted 新手,在twisted.internet.protocol.Protocol 对象的dataReceived 方法中调试我的代码时遇到了麻烦。
给定一些这样的代码
class Printer(Protocol):
def dataReceived(self, data):
print data # Works perfectly
print toto # should trigger some error since "toto" is not defined
...
response.deliverBody(Printer())
我找不到在dataReceived 上添加Errback 的方法。有办法吗?另一种调试其行为的方法?
提前感谢您的帮助。
【问题讨论】:
标签: python asynchronous twisted