efficient vim config
[dotfiles/.git] / .local / lib / python2.7 / site-packages / pynvim / msgpack_rpc / event_loop / __init__.py
1 """Event loop abstraction subpackage.
2
3 Tries to use pyuv as a backend, falling back to the asyncio implementation.
4 """
5
6 from pynvim.compat import IS_PYTHON3
7
8 # on python3 we only support asyncio, as we expose it to plugins
9 if IS_PYTHON3:
10     from pynvim.msgpack_rpc.event_loop.asyncio import AsyncioEventLoop
11     EventLoop = AsyncioEventLoop
12 else:
13     try:
14         # libuv is fully implemented in C, use it when available
15         from pynvim.msgpack_rpc.event_loop.uv import UvEventLoop
16         EventLoop = UvEventLoop
17     except ImportError:
18         # asyncio(trollius on python 2) is pure python and should be more
19         # portable across python implementations
20         from pynvim.msgpack_rpc.event_loop.asyncio import AsyncioEventLoop
21         EventLoop = AsyncioEventLoop
22
23
24 __all__ = ('EventLoop')