summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/__init__.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@dropbox.com>2013-10-30 21:52:03 (GMT)
committerGuido van Rossum <guido@dropbox.com>2013-10-30 21:52:03 (GMT)
commit5969128a865db887a8a723acc46d5ebd720ebfe8 (patch)
tree1193fcefd2ff8e5ada11d2fd507deeab8b5826ac /Lib/asyncio/__init__.py
parent90fb914b4b90f74a9ab4c12d2a3aa2fa2090f3c7 (diff)
downloadcpython-5969128a865db887a8a723acc46d5ebd720ebfe8.zip
cpython-5969128a865db887a8a723acc46d5ebd720ebfe8.tar.gz
cpython-5969128a865db887a8a723acc46d5ebd720ebfe8.tar.bz2
asyncio: Add support for running subprocesses on Windows with the IOCP event loop (Richard Oudkerk).
Diffstat (limited to 'Lib/asyncio/__init__.py')
-rw-r--r--Lib/asyncio/__init__.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/asyncio/__init__.py b/Lib/asyncio/__init__.py
index afc444d..0d288d5 100644
--- a/Lib/asyncio/__init__.py
+++ b/Lib/asyncio/__init__.py
@@ -4,10 +4,18 @@ import sys
# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
# Do this first, so the other submodules can use "from . import selectors".
+# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
try:
- import selectors # Will also be exported.
-except ImportError:
from . import selectors
+except ImportError:
+ import selectors # Will also be exported.
+
+if sys.platform == 'win32':
+ # Similar thing for _overlapped.
+ try:
+ from . import _overlapped
+ except ImportError:
+ import _overlapped # Will also be exported.
# This relies on each of the submodules having an __all__ variable.
from .futures import *