简体   繁体   中英

How can Python Read the Stdout of a Detached screen Session in Ubuntu/Linux?

How can a Python script running on an Ubuntu system read the Stdout of a program that is running in a screen session?

screen

## Now inside screen session...

./run_something

## Detach from screen...

python readScreenStdout.py     <--- can this script read the output to the screen session?

It appears you want to use screen -L logging, or tmux show-buffer or pipe-pane (or possibly capture-pane ).

Soupso obtained good results via a named pipe .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM