Replies: 1 comment
-
Hi and welcome! Does pane = session.attached_window.attached_pane
pane.send_keys('python3 ./script.py', enter=True) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible using libtmux to create a new session and then run a script in it from another python script?
Ideally, in a python program, I'd like to start a new tmux session, rename it, run 'python3 script.py' and then detach it.
I see how I can start the new session, but am missing how to run 'python3 script.py', which really is just a shell command.
Can it be done with
server.cmd()
somehow? I have experimented with it some without success and will work on it more, but wanted to know if it was even possible.Beta Was this translation helpful? Give feedback.
All reactions