blob: 88d1679edbd2a581e23312540e72d2ccffa4a174 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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")
|