From 2d2d03c08336be8ba058208ce1879e8bf9b69f03 Mon Sep 17 00:00:00 2001 From: Ian Ward Date: Fri, 17 Oct 2014 14:00:02 -0400 Subject: docs for AsyncioEventLoop --- docs/manual/mainloop.rst | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'docs/manual/mainloop.rst') diff --git a/docs/manual/mainloop.rst b/docs/manual/mainloop.rst index 1228724..b7ac6a1 100644 --- a/docs/manual/mainloop.rst +++ b/docs/manual/mainloop.rst @@ -59,7 +59,7 @@ Event Loops Urwid's event loop classes handle waiting for things for the :class:`MainLoop`. The different event loops allow you to -integrate with Twisted_, Glib_, Tornado_ libraries, +integrate with Twisted_, Glib_, Tornado_, Asyncio_ libraries, or use a simple ``select``-based loop. Event loop classes abstract the particulars of waiting for input and calling functions as a result of timeouts. @@ -76,6 +76,7 @@ Tornado_ callbacks. .. _Twisted: http://twistedmatrix.com/trac/ .. _Glib: http://developer.gnome.org/glib/stable/ .. _Tornado: http://www.tornadoweb.org/ +.. _Asyncio: https://docs.python.org/3/library/asyncio.html ``SelectEventLoop`` ------------------- @@ -137,4 +138,22 @@ This event loop integrates with Tornado. .. seealso:: - :class`TornadoEventLoop reference ` + :class:`TornadoEventLoop reference ` + +``AsyncioEventLoop`` +-------------------- + +This event loop integrates with the asyncio module in Python 3.4, +the asyncio package available for Python 3.2+ or the trollius +package available for Python 2. + +:: + + import asyncio + evl = urwid.AsyncioEventLoop(loop=asyncio.get_event_loop()) + loop = urwid.MainLoop(widget, event_loop=evl) + +.. seealso:: + + :class:`AsyncioEventLoop reference ` + -- cgit v1.2.1