Debian Codegraph @

demos/demo02.py

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 #!/usr/bin/python
2 # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
3
4 # Simple demo of changing foreground, background and brightness.
5
6 from __future__ import print_function
7 import fixpath
8 from colorama import just_fix_windows_console, Fore, Back, Style
9
10 just_fix_windows_console()
11
12 print(Fore.GREEN + 'green, '
13 + Fore.RED + 'red, '
14 + Fore.RESET + 'normal, '
15 , end='')
16 print(Back.GREEN + 'green, '
17 + Back.RED + 'red, '
18 + Back.RESET + 'normal, '
19 , end='')
20 print(Style.DIM + 'dim, '
21 + Style.BRIGHT + 'bright, '
22 + Style.NORMAL + 'normal'
23 , end=' ')
24 print()