Code Monkey home page Code Monkey logo

Comments (6)

tony avatar tony commented on July 23, 2024

@ycui:

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.

ycui avatar ycui commented on July 23, 2024

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.

tony avatar tony commented on July 23, 2024

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.

ycui avatar ycui commented on July 23, 2024

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.

tony avatar tony commented on July 23, 2024

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

stale avatar stale commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.