On 3 November 2012 01:04, Philip Herron <redbr...@gcc.gnu.org> wrote:
> Hey
>
> Not sure if this patches will ever be useful to anyone but i decided i
> wanted to be able to add commands to tmux in python as i wanted to
> interact in a nice way with my system. So i made these patches.
>
> You compile with:
>
> sh autogen.sh
> ./configure --enable-python
> make
>
> pyscript script.py
>
> It checks currently in $HOME/tmux.conf.d/script.py
> But i hard coded a test in the exec command to run tmux-test.py you
> can then run the command:
>
> pytest
>
> This is a silly command to open a web page on your broswer just to
> have a visual test. This is all very initial its just a small pet
> project i will work on time to time. To access the code its probably
> simpliest to use:
>
> git remote add python git://buildy.org/tmux.git
> git fetch python
> git checkout --track -b python-scripting python/python-scripting
>
> Might be interesing to someone :). But i don't know if its in the
> spirit of tmux to have this as default feature. But i think its nice.
>
> The python so far is:
>
> import tmux
>
> You can iterate over the dictionary:
>
> __TMUX_COMMANDS
> I am working on support where you can access the cmd_entry and execute
> the commands most of the code is there just needs finished so you
> could script your tmux in python
>
> def callable_python ():
>   pass
>
> tmux.append_command ("name", callable_python)
> Thats how easy it is to add a command to tmux in python just pass a
> callable function.
>
> --Phil

Worth noting the configure looks for python-config

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to