Comments (6)
It would help me to know more about the script's behavior / big picture. What are you trying to do? Is this a python script?
Any snippets / etc. you can share? How would you envision the workflow to be?
I would like to help write an example so it can used it to demonstrate the API.
from tmuxp.
Hi Tony,
Thanks for the quick reply. My workflow is a python script to sequentially login to a number of network devices and perform some duties there. It's written in a for loop which iterate over the device objects and the device object itself calls its method to perform the work.
Due to the large number of devices, I would like this work to be separated into 2 or 4 pieces, and I hope it could be shown on different blocks of the screen. I thought tmuxp should support such functionality.
As to the actual code snippet, I haven't got it hosted on github, but you can consider it as breaking a for loop into different sections and running them in different parts of the screen.
Thank you.
from tmuxp.
This has been very thought provoking. This is exactly the place tmuxp can shine very well.
Exactly. 1 Windows, an each section is a pane.
http://tmuxp.readthedocs.org/en/latest/about_tmux.html
One thing to be aware of is, each pane needs a way to communicate.
Have you investigated ways this could be done asynchronously / with a queue?
I am going to think this over more. Tmuxp's API would be very useful.
Imagine you have terminals open and you want the script to communicate via the For loop via a Queue (via it zeromq, twisted, etc.). If you could send me the boilerplate to how you're doing that, I could piece together an example faster.
from tmuxp.
Hi Tony,
Sorry for the late reply and happy new year.
The following is my sample client script to run few executions on different devices concurrently, by using the python built-in Threading and Queue module.
https://github.com/ycui/INWK_Device_Manager/blob/master/t_run.py
Thanks
from tmuxp.
@ycui - I have a lot on my plate right now. I am assigning this to me.
This is common enough of a use case for tmux (especially with tmuxp involved) it should be used as an example. I will ping here when I have a demonstration.
from tmuxp.
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
This bot is used to handle issues where the issue hasn't been discussed or
has gone out of date. If an issue isn't resolved and handled in a certain
period of time, it may be closed. If you would like your issue re-opened,
please create a fresh issue with the latest, up to date information and
mention this issue in it.
from tmuxp.
Related Issues (20)
- `Builder`: Race conditions after #796 / strict mypy
- `tmuxp load` AssertionError or loads session only partially HOT 16
- Trouble fetching the session_id when tmux server is already running HOT 8
- passing options to tmux command: libtmux.exc.UnknownOption HOT 4
- Pass the workspace_builder to plugin hooks instead of the tmux session
- skip existing named windows on tmuxp load -a workspace
- documentation: layouts HOT 1
- main-pane-height of incorrect size HOT 2
- [FR]Would like sample functions like tmuxinator HOT 4
- mypy: Document existing config format
- Drop Python 3.7 HOT 1
- Strange behavior on startup HOT 4
- Commands not executing HOT 7
- Move `config_reader` to `_internal`
- docs: Split API docs into multiple pages
- Move `_types` to `_internal/types`
- 1.34.0: test_environment_variables fails on really fast CI runners
- tmuxp crashes while load an config file HOT 6
- Issue with using `-t` in pane commands in session files HOT 10
- Package on Conda-Forge
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmuxp.