Compared to tmux
To some extend, pymux is a clone of tmux. This means that all the default shortcuts are the same; the commands are the same or very similar, and even a simple configuration file could be the same. (There are some small incompatibilities.) However, we definitely don't intend to create a fully compatible clone. Right now, only a subset of the command options that tmux provides are supported.
Pymux implements a few improvements over tmux:
There is a completion menu for the command line. (At the bottom of the screen.) The command line has fish-style suggestions. Both Emacs and Vi key bindings for the command line and copy buffer are well developed, thanks to all the effort we have put earlier in prompt_toolkit. Search in the copy buffer is highlighted while searching. Every pane has its own titlebar. When several clients are attached to the same session, each client can watch a different window. When clients are watching different windows, every client uses the full terminal size. Support for 24bit true color. (Disabled by default: not all terminals support it. Use the --truecolor option at startup or during attach in order to enable it.) About the performance:
Tmux is written in C, which is obviously faster than Python. This is noticeable when applications generate a lot of output. Where tmux is able to give fast real-time output for, for instance find / or yes, pymux will process the output slightly slower, and in this case render the output only a few times per second to the terminal. Usually, this should not be an issue. If it is, Pypy should provide a significant speedup. The big advantage of using Python and prompt_toolkit is that the implementation of new features becomes very easy.
Besides, Pymux is Python while tmux is C. I'm sure you can appreciate that adding a Python API to tmux would be non-trivial, both code-wise and politically.
You can see the quickstart at https://tmuxp.readthedocs.org/en/latest/quickstart_python.ht... and the API documentation at https://tmuxp.readthedocs.org/en/latest/api.html.
You can see the testcases we cover use real tmux sessions and monitor the state of the session / window / panes to assert the API functions correctly. https://github.com/tony/tmuxp/tree/master/tmuxp/testsuite
As for pymux, Jonathan Slenders' work on ptpython [1] and prompt_toolkit have been quite nice when working with shell_plus in django or debugging python projects. He's good in this area. Agreed that it's a nice thing to have pymux there.
And agreed that adding native language extensions (python, ruby, etc.) to tmux would be complicated code-wise and perhaps not in the spirit of what it aspires to be. That said, on the tmuxp side of things, a lot could be improved. For example, switching tmuxp to use control mode (-C) and filing smaller patches to expand control mode's events in tmux(1).
tmux is comparatively rock solid.
I personally find this project interesting to see, although I won't be using it.
It's maybe not a "big" why, or one you care about.
So, someone has made python run on Foo platform, lets say a watch. If I have a pure python program I can run it on that watch with no more fuss. If I have to rely on a c library then I have to get that ported to Foo platform, maybe dealing with developer keys and making "authorized" signed binary, etc, etc. Pure python is orders of magnitude easier.
That is why "Pure Python" is a thing.
Several standard libs come in pure python and C versions cause pure python is an advantage / requirement for some use cases. And speed is for others.
"python some.py" is (in some cases) vastly easier than porting/compiling/signing C code.
> The big advantage of using Python and prompt_toolkit is that the implementation of new features becomes very easy.
This is besides the benefit that even though you might not need tmux in Python, having tmux in Python might have created tmux-the-library which someone might later need.
(I haven't yet tried this but I plan on doing so. On an unrelated note, thanks to the author for making this pure Python, and for caveatting "it's not as fast as C" with "but try PyPy").