The Pipe classes

class Pipe(name=None, inheritable=False)

Bases: winsys.core._WinSysObject

A pipe is a kernel object which allows communication between two parts of a process or two separate processes, possibly on separate machines. A pipe can be named or anonymous. The former can span processes and machines; the latter are typically used within one process although they can cross processes with some effort.

Named pipes have one particular characteristic which makes them especially interesting for handing off between a client and a server: the server can transparently impersonate the security context of the client. This makes them ideal for, eg, a server which accepts requests from a client and actions them on the client’s behalf.

class AnonymousPipe(inheritable=False, buffer_size=0)

Bases: ipc.Pipe


Read bytes from the pipe.

Returns:any bytes waiting in the pipe. Will block if nothing is ready.

Writes data to the pipe. Will block if the internal buffer fills up.

class NamedPipe(name, mode=3, type=0, max_instances=255, in_buffer_size=4096, out_buffer_size=4096, default_timeout=0, inheritable=False)

Bases: ipc.Pipe

Previous topic

The Mutex class

Next topic

iasyncio – Overlapped IO

This Page