On 2015-05-05 5:01 PM, Paul Moore wrote:
On 5 May 2015 at 21:00, Yury Selivanov <yselivanov...@gmail.com> wrote:
On 2015-05-05 3:40 PM, Jim J. Jewett wrote:
On Tue May 5 18:29:44 CEST 2015, Yury Selivanov posted an updated PEP492.
Where are the following over-simplifications wrong?
(1) The PEP is intended for use (almost exclusively) with
asychronous IO and a scheduler such as the asynchio event loop.
Yes. You can also use it for UI loops. Basically, anything
that can call your code asynchronously.
Given that the stdlib doesn't provide an example of such a UI loop,
what would a 3rd party module need to implement to provide such a
thing? Can any of the non-IO related parts of asyncio be reused for
the purpose, or must the 3rd party module implement everything from
scratch?
The idea is that you integrate processing of UI events to
your event loop of choice. For instance, Twisted has
integration for QT and other libraries [1]. This way you
can easily combine async network (or OS) calls with your
UI logic to avoid "callback hell".
Quick search for something like that for asyncio revealed
this library: [2]. This small library actually re-implements
relevant low-level parts of the asyncio event loop on top of
QT primitives (another approach).
Yury
[1] http://twistedmatrix.com/trac/wiki/QTReactor
[2] https://github.com/harvimt/quamash#usage -- see first_50
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com