Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python twisted中的run()在哪里实现?_Python_Twisted - Fatal编程技术网

Python twisted中的run()在哪里实现?

Python twisted中的run()在哪里实现?,python,twisted,Python,Twisted,这是一个关于如何参考TwistedAPI文档的问题 我用twisted用python编写了一个简单的服务器程序 from twisted.internet import reactor reactor.listenTCP(8000, server.facotry) reactor.run() 这个程序运行得很好,但我想知道类reactor中run()的定义,然后我参考了TwistedAPI文档。 我写了代码 import inspect inspect.getmembers(reactor)

这是一个关于如何参考TwistedAPI文档的问题

我用twisted用python编写了一个简单的服务器程序

from twisted.internet import reactor
reactor.listenTCP(8000, server.facotry)
reactor.run()
这个程序运行得很好,但我想知道类reactor中run()的定义,然后我参考了TwistedAPI文档。 我写了代码

import inspect
inspect.getmembers(reactor)
然后,我得到了

('run', <bound method SelectReactor.run of <twisted.internet.selectreactor.SelectReactor object at 0x0000000002C68F60>>)
('run',)
我猜是twisted.internet.selectreactor.selectreactor中的run()。 但我没有找到run()


run()的定义在哪里?

SelectReactor
有两个基类。是从和派生的,它定义了Python的命令在哪里显示函数的定义?
SelectReactor
有两个基类。是从和派生的,它定义了Python的命令显示函数定义的位置吗?