def guiCall(func, *params, **kwparams):
    """Calls a gui func safely from the net thread"""
    d = Deferred()
    evt = ResponseEvent(func, d.callback, d.errback, *params, **kwparams)
    ThreadCommand.twistedThread.app.AddPendingEvent(evt)
    return d
Calls a gui func safely from the net thread
recipes/Python/286201_wx_twisted_support_using_threads/recipe-286201.py