def install():
    """
    Configure the twisted mainloop to be run inside the wxPython mainloop.
    """
    reactor = WxReactor()
    from twisted.internet.main import installReactor
    installReactor(reactor)
    return reactor

    Configure the twisted mainloop to be run inside the wxPython mainloop.
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/wxreactor.py