Closed pthebaul closed 3 hours ago
We found the following entries in the FAQ which you may find helpful:
Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.
This is an automated reply, generated by FAQtory
This is expected. Rich can only capture output generated from its own process. To capture output from another process, you will need to use subprocesses. There is good support for subprocesses in the standard library.
Don't forget to star the repository!
Follow @textualizeio for Textual updates.
Alright, thanks for your quick reply, and thank you very much for Textual!
Outputs from
os.system
orsubprocess.call
are not captured by textual, and appear at the top-left of the terminal instead.My goal is to run scripts upon button presses, and to see the scripts' outputs in a Log widget in realtime.
textual diagnose
didn't recognize my terminal. I am using Windows Terminal version 1.21.2911.0, but I have the same issue using the legacy terminal (by selecting "Windows Console Host" in Windows 11 settings). The issue is there using PowerShell 7.4.6 or MS-DOS for the terminal. Note thatos.system
runs MS-DOS.Here is a video, and the MRE can be found below.
https://github.com/user-attachments/assets/92c3a4e4-1b40-4476-8e4f-6d591d71f5ef
Textual Diagnostics
Versions
Python
Operating System
Terminal
Rich Console options