summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/windows_utils.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@dropbox.com>2013-11-01 21:20:55 (GMT)
committerGuido van Rossum <guido@dropbox.com>2013-11-01 21:20:55 (GMT)
commita8d630a6e6190a4873a16a6a8c02f561e1e1c7fe (patch)
tree9a083c9b45a312245b7d785666cf9e1edb876706 /Lib/asyncio/windows_utils.py
parent3a703921a61d45718fdc01e29e2ae8e907d9f0a0 (diff)
downloadcpython-a8d630a6e6190a4873a16a6a8c02f561e1e1c7fe.zip
cpython-a8d630a6e6190a4873a16a6a8c02f561e1e1c7fe.tar.gz
cpython-a8d630a6e6190a4873a16a6a8c02f561e1e1c7fe.tar.bz2
asyncio: Various style nits.
Diffstat (limited to 'Lib/asyncio/windows_utils.py')
-rw-r--r--Lib/asyncio/windows_utils.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/asyncio/windows_utils.py b/Lib/asyncio/windows_utils.py
index 2fc3f7a..aa1c064 100644
--- a/Lib/asyncio/windows_utils.py
+++ b/Lib/asyncio/windows_utils.py
@@ -18,18 +18,18 @@ import _winapi
__all__ = ['socketpair', 'pipe', 'Popen', 'PIPE', 'PipeHandle']
-#
+
# Constants/globals
-#
+
BUFSIZE = 8192
PIPE = subprocess.PIPE
STDOUT = subprocess.STDOUT
_mmap_counter = itertools.count()
-#
+
# Replacement for socket.socketpair()
-#
+
def socketpair(family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0):
"""A socket pair usable as a self-pipe, for Windows.
@@ -57,9 +57,9 @@ def socketpair(family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0):
lsock.close()
return (ssock, csock)
-#
+
# Replacement for os.pipe() using handles instead of fds
-#
+
def pipe(*, duplex=False, overlapped=(True, True), bufsize=BUFSIZE):
"""Like os.pipe() but with overlapped support and using handles not fds."""
@@ -105,9 +105,9 @@ def pipe(*, duplex=False, overlapped=(True, True), bufsize=BUFSIZE):
_winapi.CloseHandle(h2)
raise
-#
+
# Wrapper for a pipe handle
-#
+
class PipeHandle:
"""Wrapper for an overlapped pipe handle which is vaguely file-object like.
@@ -137,9 +137,9 @@ class PipeHandle:
def __exit__(self, t, v, tb):
self.close()
-#
+
# Replacement for subprocess.Popen using overlapped pipe handles
-#
+
class Popen(subprocess.Popen):
"""Replacement for subprocess.Popen using overlapped pipe handles.