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