Easily print colored text.
Project description
# CliRAINBOW
Easily print colored text.
## Example usage
```python
>>> from clirainbow import Colorizer
>>> from colors import RED, GREEN
>>> c = Colorizer()
>>> c.print('<hello> <world!>', RED, GREEN)
```
## Additional info
* Angle brackets are used instead of the traditional curly brackets in order to prevent clashes with Python's builtin string formatting facilities
* If you want to insert a literal bracket, double it (e.g. write `<<` instead of `<`)
* (this is the same behavior as Python's builtins)
## Disclaimer
Colors may not appear on certain systems (e.g., Windows) or with certain terminals.
## Dependencies
CliRAINBOW is built on top of colorama : https://github.com/tartley/colorama
## Future plans
* Generate code in `colors.py` with a script instead of at runtime
* Allow code completion
* Remove annoying error messages
* Add support for reusing colors by index, e.g. `c.print('<0:oh> <1:hai> <0:there>', colors.RED, colors.BLACK)`
* Make it more similar to Python's `format`
Easily print colored text.
## Example usage
```python
>>> from clirainbow import Colorizer
>>> from colors import RED, GREEN
>>> c = Colorizer()
>>> c.print('<hello> <world!>', RED, GREEN)
```
## Additional info
* Angle brackets are used instead of the traditional curly brackets in order to prevent clashes with Python's builtin string formatting facilities
* If you want to insert a literal bracket, double it (e.g. write `<<` instead of `<`)
* (this is the same behavior as Python's builtins)
## Disclaimer
Colors may not appear on certain systems (e.g., Windows) or with certain terminals.
## Dependencies
CliRAINBOW is built on top of colorama : https://github.com/tartley/colorama
## Future plans
* Generate code in `colors.py` with a script instead of at runtime
* Allow code completion
* Remove annoying error messages
* Add support for reusing colors by index, e.g. `c.print('<0:oh> <1:hai> <0:there>', colors.RED, colors.BLACK)`
* Make it more similar to Python's `format`
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
clirainbow-1.0.1.tar.gz
(3.5 kB
view hashes)
Built Distribution
clirainbow-1.0.1-py3-none-any.whl
(11.8 kB
view hashes)
Close
Hashes for clirainbow-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5eae524adcf98c2f029cd1d12bd7f678ac9c2d3388b45eb631df1969ab833a9 |
|
MD5 | f7fb36a53443d9da3c02163ae791d6b3 |
|
BLAKE2b-256 | 9407496c0109b5a70e94b1710c230962c5ae34791ef35301e7962bcc9f4de77d |