Add BaseContact

override exported symbols (__all__)
pull/8/head
nico 2015-08-17 14:17:54 +02:00
rodzic e018b2a723
commit c448841ea6
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -2,6 +2,8 @@
#
# See the file license.txt for copying permission.
__all__ = ['get_plugin_manager', 'BaseContext', 'PluginManager']
import pkg_resources
import logging
import asyncio
@ -16,6 +18,14 @@ def get_plugin_manager(namespace):
global plugins_manager
return plugins_manager.get(namespace, None)
class BaseContext:
def __init__(self, loop=None):
if loop is not None:
self._loop = loop
else:
self._loop = asyncio.get_event_loop()
class PluginManager:
"""
Wraps setuptools Entry point mechanism to provide a basic plugin system.