import sys
import asyncio
import twisted.internet
from twisted.internet.asyncioreactor import AsyncioSelectorReactor
if sys.platform == 'win32':
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
reactor = AsyncioSelectorReactor(asyncio.get_event_loop())
twisted.internet.reactor = reactor
sys.modules['twisted.internet.reactor'] = reactor
参考资料
网友评论