Replies: 1 comment 3 replies
-
You can do that with rich.live.Live. If you want anything more advanced that what Live offers, you might want to look at Textual https://textual.textualize.io/ |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can anyone point me in the direction of using rich or textualize to control my running code output?
I run loads of python scripts that run endlessly to collect data or stats or process files. Each one is a python script that print()s their progress to the terminal/console to show what they are currently doing and summarise the amount of work done to date.
It would be much better to have one static line at the bottom of the terminal window that was a static status bar on which I could put summary info about the running task like Total Requests, Failed Request Count, Fail Percentage, Current Batch ID, Last Batch ID etc. etc. For example, something like the below:
The general output from the app would continue to be displayed above this as a new update is printed to the console and I'd want it to scroll to the show the latest line printed with the option to scroll back through the history like a usual python app that prints to the terminal.
Can rich do this perhaps using the console.status class?
Beta Was this translation helpful? Give feedback.
All reactions