It's a problem in any event-driven system.  You can't block and still call
other things that need to happen.

One trick twisted has is an inline callback that uses generators to allow
code that seems like it's blocking.

If you are using the default SelectEventLoop you might be able to run the
dialog as its own MainLoop that exits when its done and returns control to
the first (note: I haven't actually tried this)

Ian
On Jan 19, 2012 6:14 AM, "Marco Giusti" <[email protected]> wrote:

> attached an idea that comes to me about dialogs, but sadly it does not
> work, may you can help me to investigate why. what is nice about this
> idea is that a dialog freeze the normal program execution the following
> logic could be implemented:
>
>        dialog = YesNoDialog()
>        ret = dialog.run()
>        if ret = 'yes':
>                ...
>        elif ret == 'no':
>                ...
>
> _______________________________________________
> Urwid mailing list
> [email protected]
> http://lists.excess.org/mailman/listinfo/urwid
>
>
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid

Reply via email to