-
Notifications
You must be signed in to change notification settings - Fork 0
/
rich_test.py
39 lines (29 loc) · 840 Bytes
/
rich_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import mrich
print(mrich.console)
mrich.print('[red]Hello')
mrich.out('[red]Hello')
mrich.rule('[red]Hello')
mrich.console.log('[red] Hello')
mrich.warning("warning text goes here")
mrich.error("error text goes here")
mrich.success("success text goes here")
mrich.debug("debug text goes here")
mrich.header("header text goes here")
mrich.title("title text goes here")
mrich.reading("reading text goes here")
mrich.writing("writing text goes here")
mrich.var("thing",123)
mrich.var("thing",True, unit='truths')
mrich.h1("header 1")
mrich.h2("header 2")
mrich.h3("header 3")
import time
with mrich.loading('Loading...'):
time.sleep(2)
with mrich.clock('Loading...'):
time.sleep(2)
for i in mrich.track(range(20), prefix='Sleeping zzzzz...'):
time.sleep(0.2)
if i == 3:
mrich.warning("interruption!")
raise NotImplementedError