模块“ twisted.internet.reactor”没有“运行”成员

时间:2019-12-14 01:20:31

标签: python twisted

当我在VS Code中使用扭曲时,有一个问题

从“扭曲的”官方网站复制了以下代码:

from twisted.internet import protocol, reactor, endpoints

class Echo(protocol.Protocol):
    def dataReceived(self, data):
        self.transport.write(data)

class EchoFactory(protocol.Factory):
    def buildProtocol(self, addr):
        return Echo()

endpoints.serverFromString(reactor, "tcp:1234").listen(EchoFactory())
reactor.run()

显示错误:

  

模块“ twisted.internet”没有“运行”成员 pylint(无成员)

0 个答案:

没有答案