Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.1
2 Name: ansi
3 Version: 0.3.7
4 Summary: ANSI cursor movement and graphics
5 Home-page: https://github.com/tehmaze/ansi/
6 Author: Wijnand Modderman-Lenstra
7 Author-email: [email protected]
8 License: MIT License
9 Requires-Python: >=3.6
10 Description-Content-Type: text/markdown
11 License-File: LICENSE.md
12 Requires-Dist: typing_extensions>=3.6.4; python_version < "3.8"
13
14 ANSI
15 ====
16
17 Various ANSI escape codes, used in moving the cursor in a text console or
18 rendering coloured text.
19
20
21 Example
22 -------
23
24 Print something in bold yellow on a red background:
25
26 >>> from ansi.colour import fg, bg
27 >>> from ansi.colour.fx import reset
28 >>> msg = (bg.red, fg.yellow, 'Hello world!', reset)
29 >>> print(''.join(map(str, msg)))
30 ...
31
32 If you like syntactic sugar, you may also do:
33
34 >>> from ansi.colour import fg, bg
35 >>> print(bg.red(fg.yellow('Hello world!')))
36 ...
37
38 Also, 256 RGB colours are supported:
39
40 >>> from ansi.colour.rgb import rgb256
41 >>> from ansi.colour.fx import reset
42 >>> msg = (rgb256(0xff, 0x80, 0x00), 'hello world', reset)
43 >>> print(''.join(map(str, msg)))
44 ...
45
46 If you prefer to use American English instead:
47
48 >>> from ansi.color import ...
49
50
51 References
52 ----------
53
54 https://www.ecma-international.org/publications-and-standards/standards/ecma-48/
55
56
57 Requirements
58 ------------
59 Ansi requires python 3.6 and supports typing.