How could I erase a row table in rich? (Erase the rows or reset all the table) ex. How could I reset tableTest or erase a row? Answer No, rich does not provide any APIs to Delete/Remove the rows. See this Support for deleting/removing rows/columns from table to understand why no such APIs are added to the Tab…
Tag: rich
Run python.exe with Windows Terminal instead of Command Prompt
Recently I am playing around with Rich. It’s really helpful while debugging and tracking code running progress. However, if I use task scheduler to auto-run python script, it will open command prompt to run the script instead of others like Window PowerShell. All the output from Rich will not show in co…
Some numbers are automatically formatted using rich.console, how to prevent this?
The following code will print the number 123 highlighted (in blue, in my terminal). This happens on many strings with numbers, what could be the problem that causes this unwanted formatting, and how to prevent it? Answer As per Rich documentation, “Rich can apply styles to patterns in text which you pri…
How to highlight in rich.prompt.Prompt
I have this highlighter If I do something like console.print() it gives the custom highlighting but it dosen’t give custom highlighting for rich.prompt.Prompt.ask() How can I get the highlighter for rich.prompt.Prompt.ask() Answer Are you expecting the text you enter to be highlighted as you type? Rich …