Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

exception libtmux latest

NotInsideTmux

Raised when the process is not running inside a tmux pane.

Base types LibTmuxException
Source and package
Qualified name
libtmux.exc.NotInsideTmux
Module
libtmux.exc
Package
libtmux
Source
src/libtmux/exc.py
exception libtmux.exc.NotInsideTmux

Description#

tmux exports TMUX and TMUX_PANE into the environment of every pane it spawns. The from_env() family raises this when one of them is missing or malformed -- i.e. the caller is not (or is no longer) recognizable as a tmux pane's child process.

Examples#

>>> from libtmux import exc
>>> str(exc.NotInsideTmux("TMUX"))
'Not inside a tmux pane: $TMUX is unset or empty'
>>> str(exc.NotInsideTmux("TMUX_PANE", reason="not a pane id"))
'Not inside a tmux pane: $TMUX_PANE is not a pane id'
>>> str(exc.NotInsideTmux())
'Not inside a tmux pane'

It is part of the LibTmuxException hierarchy:

>>> issubclass(exc.NotInsideTmux, exc.LibTmuxException)
True

Members1#

Inherited members1 member#

Reached through libtmux.exc.LibTmuxException.

Guides#

Pages that discuss NotInsideTmux.

Esc

Type to search.

Reference previewOpen reference