Hi

This looks nice on a quick look but I'm not sure I want to include it in
tmux proper, I like Python but even an optional dependency on it is a
big deal.

It might be easier for people to plau with if you could send it as one
patch, or split up as a logical set of changes rather than, for example,
including patches that are just bug fixes on top of previous `patches
(such as 06/17 and others) - I'm sure some of the git wizards on the
list could tell you how to do that latter if you wish.



On Sat, Nov 03, 2012 at 01:04:04AM +0000, Philip Herron 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


















> ------------------------------------------------------------------------------
> 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


------------------------------------------------------------------------------
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