ControlMode
Context manager that spawns a tmux control-mode client.
Source and package
- Qualified name
-
libtmux._internal .control _mode .Control Mode - Module
- libtmux._internal.control_mode
- Package
- libtmux
- Source
- src/libtmux/_internal/control_mode.py
-
Description#
Creates a real client attached to the session, visible in
Server.list_clients(). The client communicates via the tmux control protocol on stdout.While active,
Server.list_clients()will include this client.Examples#
>>> with ControlMode(server=server, session=session) as ctl:... clients = server.list_clients()... assert len(clients) > 0... assert ctl.client_name != ''Discussed in Control mode vs one-shot
Members9#
- client_name: str attribute
- server: Server attribute
- session: Session attribute
- stdout: t
.IO [str] attribute - __enter__ method Spawn control-mode client and wait for registration.
- __exit__ method Terminate control-mode client.
- __init__ method
- _proc: subprocess
.Popen [str] attribute - _write_fd: int attribute