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

property libtmux stable

Server.sessions

Sessions contained in server.

Source and package
Qualified name
libtmux.Server.sessions
Module
libtmux
Declared in
Server
Package
libtmux
Source
src/libtmux/server.py
Other languages
PowerShellcmdlet Juliafunction RubyLuaTypeScriptRustGoJavaC#C++SwiftKotlinScalaF#function
sessions (self) → QueryList[Session]

Description#

Can be accessed via .sessions.get() and .sessions.filter()

Returns an empty QueryList when tmux's list-sessions fails for any reason — no running daemon, a missing socket, a permission error, or a subprocess failure. To distinguish "no sessions" from "tmux unreachable", call Server.is_alive or Server.raise_if_dead .

tmux command list-sessions

Discussed in Filtering and queries · Traversal

In other ports List the server’s sessions
Esc

Type to search.

Reference preview Open reference