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

Python API

Python documentation

libtmux.Server.has_session

Python

View as Markdown

Module
libtmux
Declared in
Server
Package
libtmux
Source
src/libtmux/server.py
Other languages
Ruby Lua TypeScriptRustGoJava.NET C++ Swift
has_session ( self , target_session : str , exact : bool = True ) → bool
method [source]
method [source]
has_session

Return True if session exists.

Parameters
  • target_session ( str ) – session name

  • exact ( bool ) – match the session name exactly. tmux uses fnmatch by default. Internally prepends = to the session in $ tmux has-session.

Returns

bool

Raises
In other ports Whether a session with this name exists

0 declared, 0 inherited

Esc

Type to search.