def portableInstall(useGtk=True):
    """
    Configure the twisted mainloop to be run inside the gtk mainloop.
    """
    reactor = PortableGtkReactor()
    from twisted.internet.main import installReactor
    installReactor(reactor)
    return reactor

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