HOME


Mini Shell 1.0
DIR: /proc/thread-self/root/usr/share/doc/python3-rich/examples/
Upload File :
Current File : //proc/thread-self/root/usr/share/doc/python3-rich/examples/status.py
from time import sleep
from rich.console import Console

console = Console()
console.print()

tasks = [f"task {n}" for n in range(1, 11)]

with console.status("[bold green]Working on tasks...") as status:
    while tasks:
        task = tasks.pop(0)
        sleep(1)
        console.log(f"{task} complete")