github tmux-python/tmuxp v1.6.0
1.6.0 - meet tmuxp shell

latest releases: v1.47.0, v1.46.0, v1.46.0a0...
4 years ago

#636 New command: tmuxp shell and #638 tmuxp shell_plus

Automatically preloads session, window, and pane via libtmux api objects and makes them available in a python console.

tmuxp-shell

In python 3.7+, supports PYTHONBREAKPOINT:

$ pip install ipdb
$ env PYTHONBREAKPOINT=ipdb.set_trace tmuxp shell
You can execute python directly via -c:

$ tmuxp shell -c 'print(session.name); print(window.name)'
my_server
my_window

$ tmuxp shell my_server -c 'print(session.name); print(window.name)'
my_server
my_window

$ tmuxp shell my_server my_window -c 'print(session.name); print(window.name)'
my_server
my_window

$ tmuxp shell my_server my_window -c 'print(window.name.upper())'
MY_WINDOW

tmuxp shell_plus has autocompletion

Don't miss a new tmuxp release

NewReleases is sending notifications on new releases.