def run_coroutine_dialog(self, coro, text):
        """ run coroutine in a waiting dialog, with a Cancel button that cancels the coroutine"""
        from .util import RunCoroutineDialog
        d = RunCoroutineDialog(self, text, coro)
        return d.run()
 run coroutine in a waiting dialog, with a Cancel button that cancels the coroutine
electrum/gui/qt/main_window.py