You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python only natively supports named pipes in Posix systems via `os.mkfifo`. This package extends the support to Windows and defines a `NPopen` class as a cross-platform solution to manage named pipes.
9
+
Python natively supports named pipes only in Posix systems via `os.mkfifo`.
10
+
This package extends the support to Windows and defines a `NPopen` class as
11
+
a cross-platform solution to manage named pipes.
10
12
11
13
## Installation
12
14
@@ -34,7 +36,6 @@ with NPopen('r+') as pipe: # bidirectional (duplex) binary pipe
34
36
# - Windows: \\.\pipe\[0-9]+
35
37
36
38
# 3. Wait for the client to connect and create a stream
37
-
# - accepts other open() arguments: buffering, encoding, error, newline
38
39
# - blocks until connection is established
39
40
# - returns an io-compatible stream
40
41
stream = pipe.wait()
@@ -50,8 +51,8 @@ with NPopen('r+') as pipe: # bidirectional (duplex) binary pipe
50
51
51
52
stream.write(out_bytes)
52
53
53
-
# 5. automatically closes the stream and destroys the pipe object
54
-
# when out of the contenxt
54
+
# 5. the stream is automatically closed and the pipe object is destroyed
0 commit comments