| 1 |
:: Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. |
| 2 |
|
| 3 |
:: Script to demonstrate features of colorama. |
| 4 |
|
| 5 |
:: This demo is also used to verify correctness visually, because we don't |
| 6 |
:: have automated tests. |
| 7 |
|
| 8 |
:: Implemented as a bash script which invokes python so that we can test the |
| 9 |
:: behaviour on exit, which resets default colors again. |
| 10 |
|
| 11 |
:: print grid of all colors and brightnesses |
| 12 |
python demo01.py |
| 13 |
|
| 14 |
:: Simple demo of changing foreground, background and brightness. |
| 15 |
python demo02.py |
| 16 |
|
| 17 |
:: Demonstrate the different behavior when autoreset is True and False. |
| 18 |
python demo03.py |
| 19 |
|
| 20 |
:: check that stripped ANSI in redirected stderr does not affect stdout |
| 21 |
if exist demo04.out del demo04.out |
| 22 |
python demo04.py 2> demo04.out |
| 23 |
type demo04.out |
| 24 |
if exist demo04.out del demo04.out |
| 25 |
|
| 26 |
:: Demonstrate the difference between colorama initialized with wrapping on and off. |
| 27 |
python demo05.py |
| 28 |
|
| 29 |
:: Demonstrate printing colored, random characters at random positions on the screen |
| 30 |
python demo06.py |
| 31 |
|
| 32 |
:: Demonstrate cursor relative movement: UP, DOWN, FORWARD, and BACK in colorama.CURSOR |
| 33 |
python demo07.py |
| 34 |
|
| 35 |
:: Demonstrate the use of a context manager instead of manually using init and deinit |
| 36 |
python demo08.py |