NotInsideTmux
Raised when the process is not running inside a tmux pane.
Source and package
- Qualified name
-
libtmux.exc .Not Inside Tmux - Module
- libtmux.exc
- Package
- libtmux
- Source
- src/libtmux/exc.py
-
Description#
tmux exports
$TMUXand$TMUX_PANEinto the environment of every pane it spawns. Thefrom_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
LibTmuxExceptionhierarchy:>>> issubclass(exc.NotInsideTmux, exc.LibTmuxException)TrueDiscussed in Environment
Inherited members1 member#
Reached through libtmux.exc.LibTmuxException.