Core LibrarystableAPI Reference

Choose documentation 3

stable

Current version

stable
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Python API

class libtmux stable

ControlMode

Context manager that spawns a tmux control-mode client.

Source and package
Qualified name
libtmux._internal.control_mode.ControlMode
Module
libtmux._internal.control_mode
Package
libtmux
Source
src/libtmux/_internal/control_mode.py
class libtmux._internal.control_mode.ControlMode

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#

Esc

Type to search.

Reference preview Open reference