1 """The asyncio package, tracking PEP 3156.""" 2 3 import sys 4 5 # The selectors module is in the stdlib in Python 3.4 but not in 3.3. 6 # Do this first, so the other submodules can use "from . import selectors". 7 # Prefer asyncio/selectors.py over the stdlib one, as ours may be newer. 8 try: 9 from . import selectors 10 except ImportError: 11 import selectors # Will also be exported. 12 13 if sys.platform == 'win32': 14 # Similar thing for _overlapped. 15 try: 16 from . import _overlapped 17 except ImportError: 18 import _overlapped # Will also be exported. 19 20 # This relies on each of the submodules having an __all__ variable. 21 from .base_events import * 22 from .coroutines import * 23 from .events import * 24 from .futures import * 25 from .locks import * 26 from .protocols import * 27 from .queues import * 28 from .streams import * 29 from .subprocess import * 30 from .tasks import * 31 from .transports import * 32 33 __all__ = (base_events.__all__ + 34 coroutines.__all__ + 35 events.__all__ + 36 futures.__all__ + 37 locks.__all__ + 38 protocols.__all__ + 39 queues.__all__ + 40 streams.__all__ + 41 subprocess.__all__ + 42 tasks.__all__ + 43 transports.__all__) 44 45 if sys.platform == 'win32': # pragma: no cover 46 from .windows_events import * 47 __all__ += windows_events.__all__ 48 else: 49 from .unix_events import * # pragma: no cover 50 __all__ += unix_events.__all__ 51