Replies: 2 comments 4 replies
-
We found the following entry 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. Rich was created by Will McGugan. Consider sponsoring Will's work on Rich. This is an automated reply, generated by FAQtory |
Beta Was this translation helpful? Give feedback.
-
Rich has no way of getting the output from your subprocess, and therefore can't perform the magic required to integrate it with the spinner. If you want to do this, you will need to capture the output from your subprocess and print it in the main process. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
I am writing a script to run external programs with the
subprocess
module. I want to display a status message with a spinner while the program is running. However, using simplesubprocess.run
inside a status context causes the status line to be printed whenever the process prints something, which ruins the result. To illustrate it, consider a simple external program namedfoo
that does some "work":Now my script looks something like this:
When running this script, the status line remains on the console each time
foo
prints something, which makes an ugly result:Screencast.from.2025-10-14.13-37-30.webm
Platform
Click to expand
I am running on Linux with the Wezterm terminal.
Results of
rich.diagnose
:Beta Was this translation helpful? Give feedback.
All reactions