112 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
3
votes
2
answers
252
views
How can I change font size in Textual CSS?
I'm using the Textual library and trying to change font-size:
https://textual.textualize.io/guide/CSS/
My current TCSS code:
#list_label {
font-size:20;}
But when I run the main script I get an ...
2
votes
2
answers
488
views
How to create individual rich progress bars for each worker in Python multiprocessing's imap_unordered()?
I have a simple code that you can run (the logging is to differentiate 4 workers):
import time
import random
import logging
import logging.handlers
from multiprocessing.dummy import Pool
def ...
0
votes
0
answers
41
views
Abstracting rich Progress bar inside a class not working
I would like to hide the creation of a rich Progress() bars and associated tasks inside a class. I thought the following will work, but it doesn't. The progress bar doesn't render.
class Klass:
@...
1
vote
1
answer
336
views
Logging in PySide6 GUI with rich.logging RichHandler and QTextEdit HTML text, causes spacing and alignment issues
I want to show the application log on the GUI in some way.
I am using my own class, which inherits from both QTextEdit and logging.Handler. It is added to logging as a handler at init.
If I insert the ...
1
vote
0
answers
249
views
rich.Progress nested with correct time
I try to implement a nested progress bar, which resets the inner.
The following works for displaying the progress as I expected:
import time
from rich.progress import Progress
with Progress() as ...
0
votes
1
answer
24
views
How to cause the python Rich library to alert the user on invalid tags?
Consider the code snippet below, the intention is to print Loading file [foo.bar] but instead it print only Loading file because [foo.bar] is discarded silently as an invalid markdown tag.
Is there a ...
1
vote
1
answer
231
views
How to disable the implicit formatting of python rich?
Consider the code below, the colored formatting of bbb is explicit by markdown tags, while the colored formatting of 123 and ccc are implicit because they were identified as a number and string ...
0
votes
1
answer
113
views
Why is Python Rich printing in green?
Using Rich I get what I think is a spurious green output in the console.
In the following code, the "d:c" is coloured green, the rest of the text is as expected.
from rich.logging import ...
-1
votes
1
answer
168
views
How can I eliminate spaces around Panel titles in Rich?
I'm using Rich's Panel feature. Is there a way to eliminate the extra spaces Panel puts around title text? Here's an example from a Wordle program, which shows a sequence of Guesses. (It is written in ...
0
votes
1
answer
294
views
How to Display Progress Bars with Scrolling in Python's rich Library?
I'm using Python's rich library to display progress bars in my terminal application. However, I'm encountering an issue where the progress bars get truncated with ... when the number of tasks exceeds ...
-2
votes
1
answer
108
views
How do I pretty print the source code of functions contained in a class instance's attributes?
I would like to use rich to pretty print a Python class like so:
from dataclasses import dataclass
import inspect
from typing import Any, Callable
from rich import print as rprint
import rich.repr
...
bzm3r's user avatar
- 4,684
0
votes
1
answer
2k
views
How to get Rich to print out final table without cutting off the bottom?
I am using the "Rich" printing tool in Python. It's working great - but I have a problem. When I run it with more content than fits on the terminal window, it cuts everything off at the ...
0
votes
1
answer
130
views
Optimization problem for webcam to ASCII using 'rich' library in python
The code for this is in python and goes as follows
from PIL import Image
from rich.console import Console
from rich.text import Text
from cv2 import imwrite, VideoCapture
from os import system, name
#...
1
vote
0
answers
117
views
trio and rich, live update, abandon_on_cancel, console cursor vanishes
I like to combine async code with a rich tui in a small tool to observe some hardware states.
The tool should run endlessly after it has been started so if somebody wants to control the hardware he ...
1
vote
2
answers
1k
views
python rich.table - how to hide ONLY the right border?
I am trying to use rich.table and would like to show only the top & left borders (i don't care about the bottom border).
Ideally, I would like to control & customize the borders from the cell ...