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.2.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file clirainbow-1.0.2.tar.gz
.
File metadata
- Download URL: clirainbow-1.0.2.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4238a66d7536c8f7cca0d77360ebe4e51ab0f27dea27a5d079f288220d2252b3 |
|
MD5 | 983077ee6cc45ffcb9bb14edac65ce47 |
|
BLAKE2b-256 | 912f7e4d575684ffe97f97506f0eafe108f165b2421ffc577020678248011c1a |
File details
Details for the file clirainbow-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: clirainbow-1.0.2-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 646fa0d02caa6d39808833f69b7557d6e8fd58143f9a3fdab02f11ae2f99741e |
|
MD5 | 6e81d5bfb4bc3ec4aed61fbe0e2ab7d4 |
|
BLAKE2b-256 | 121c069a21b0e9d9326fa2653abb7ac261487ad60a36b02de144779d884eb77d |