6. windows.pipe
– Inter-Process Communication¶
windows.pipe
is wrapper around _multiprocessing.PipeConnection
simplifiying its use.
The main improvement are:
- send/recv object from a pipe name in one line
- Context manager around pipe connection
Note
see sample windows.pipe
6.1. Helper functions¶
-
windows.pipe.
create
(addr, security_descriptor=None)¶ Create a namedpipe pipe
addr
Returns type: PipeConnection
-
windows.pipe.
connect
(addr)¶ Connect to the named pipe
addr
Returns type: PipeConnection
6.2. PipeConnection¶
-
class
windows.pipe.
PipeConnection
(connection, name=None, server=False)[source]¶ A wrapper arround
_multiprocessing.PipeConnection
able to work as a ContextManager-
classmethod
connect
(addr)[source]¶ Connect to the named pipe
addr
Returns type: PipeConnection
-
classmethod
create
(addr, security_descriptor=None)[source]¶ Create a namedpipe pipe
addr
Returns type: PipeConnection
-
classmethod
from_handle
(phandle, *args, **kwargs)[source]¶ Create a
PipeConnection
from pipe handle phandle
-
classmethod