Running Shell Scripts with Real-Time Output in a Text Widget #5393
-
Hello, I'm working on a project where I need to run shell scripts and display their output in a text widget in real time. I tried using subprocess but couldn't achieve the desired result. (I have python 3.7 in my working machine 😭) Is there a recommended way to execute shell scripts and stream their output to a text widget with minimal latency while ensuring safety and stability? Any guidance or examples would be greatly appreciated. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Subprocess would be the way to go. You should do that in a worker to avoid preventing the UI from updating. I'm afraid we dropped 3.7 support in Textual a while back. So you may be stuck at an older Textual. |
Beta Was this translation helpful? Give feedback.
Subprocess would be the way to go. You should do that in a worker to avoid preventing the UI from updating.
I'm afraid we dropped 3.7 support in Textual a while back. So you may be stuck at an older Textual.