Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
pip._vendor.pygments.console Namespace Reference

Functions

 reset_color ()
 
 colorize (color_key, text)
 
 ansiformat (attr, text)
 

Variables

str esc = "\x1b["
 
dict codes = {}
 
list dark_colors
 
list light_colors
 
int x = 30
 

Detailed Description

    pygments.console
    ~~~~~~~~~~~~~~~~

    Format colored console output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.

Function Documentation

◆ ansiformat()

ansiformat (   attr,
  text 
)
Format ``text`` with a color and/or some attributes::

    color       normal color
    *color*     bold color
    _color_     underlined color
    +color+     blinking color

Definition at line 48 of file console.py.

48def ansiformat(attr, text):
49 """
50 Format ``text`` with a color and/or some attributes::
51
52 color normal color
53 *color* bold color
54 _color_ underlined color
55 +color+ blinking color
56 """
57 result = []
58 if attr[:1] == attr[-1:] == '+':
59 result.append(codes['blink'])
60 attr = attr[1:-1]
61 if attr[:1] == attr[-1:] == '*':
62 result.append(codes['bold'])
63 attr = attr[1:-1]
64 if attr[:1] == attr[-1:] == '_':
65 result.append(codes['underline'])
66 attr = attr[1:-1]
67 result.append(codes[attr])
68 result.append(text)
69 result.append(codes['reset'])
70 return ''.join(result)
for i

References i.

◆ colorize()

colorize (   color_key,
  text 
)

Definition at line 44 of file console.py.

44def colorize(color_key, text):
45 return codes[color_key] + text + codes["reset"]
46
47

◆ reset_color()

reset_color ( )

Definition at line 40 of file console.py.

40def reset_color():
41 return codes["reset"]
42
43

Variable Documentation

◆ codes

dict codes = {}

Definition at line 13 of file console.py.

◆ dark_colors

list dark_colors
Initial value:
1= ["black", "red", "green", "yellow", "blue",
2 "magenta", "cyan", "gray"]

Definition at line 24 of file console.py.

◆ esc

str esc = "\x1b["

Definition at line 11 of file console.py.

◆ light_colors

list light_colors
Initial value:
1= ["brightblack", "brightred", "brightgreen", "brightyellow", "brightblue",
2 "brightmagenta", "brightcyan", "white"]

Definition at line 26 of file console.py.

◆ x

int x = 30

Definition at line 29 of file console.py.