On 05/02/2015 11:54 AM, Jessica Tsui wrote:

I was working on my program and everything was fine, out of the blue the python editor just told me that connectTCP and listenTCP cannot be referenced in reactor.py. I tried to reinstall twisted but that didn't help at all. How could I solve this?


reactor.py doesn't have those, yes - that's expected. Twisted does this terrible thing where it replaces "twisted.internet.reactor", which starts out as reactor.py, with a new object at import time. So your code should work even though the file itself is missing those functions. This is where it does that:

https://github.com/twisted/twisted/blob/trunk/twisted/internet/reactor.py#L36

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to