@contextmanager
def event_loop():

    app = get_app_qt4()

    yield

    app.sendPostedEvents()
    app.processEvents()
Returns an object if it can be found (using get_object_or_404).
dataset/ETHPy150Open enthought/pyface/pyface/ui/qt4/util/testing.py/event_loop--crossover with--dataset/ETHPy150Open timsavage/django-extras/django_extras/contrib/auth/shortcuts.py/get_owned_object_or_40x