summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Ward <ian@excess.org>2014-10-17 14:00:02 -0400
committerIan Ward <ian@excess.org>2014-10-17 14:01:57 -0400
commit2d2d03c08336be8ba058208ce1879e8bf9b69f03 (patch)
tree879e971f6813f0b9affd902f7ebbefac144c78bc
parente56b4a10b258d820ce0db9e662545d5981e708dd (diff)
downloadurwid-2d2d03c08336be8ba058208ce1879e8bf9b69f03.tar.gz
docs for AsyncioEventLoop
-rw-r--r--docs/manual/mainloop.rst23
1 files changed, 21 insertions, 2 deletions
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 <TornadoEventLoop>`
+ :class:`TornadoEventLoop reference <TornadoEventLoop>`
+
+``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 <AsyncioEventLoop>`
+