Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saksmt/py-colored-string
Python library for colorizing strings in bash
https://github.com/saksmt/py-colored-string
Last synced: about 2 months ago
JSON representation
Python library for colorizing strings in bash
- Host: GitHub
- URL: https://github.com/saksmt/py-colored-string
- Owner: saksmt
- Created: 2014-11-19T10:39:05.000Z (about 10 years ago)
- Default Branch: develop
- Last Pushed: 2016-02-29T18:13:23.000Z (almost 9 years ago)
- Last Synced: 2024-10-04T16:18:02.405Z (3 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
py-colored-string
=================Python library for colorizing strings in bash
API
---**Enumerations(via static class variables)**
*coloredstring.util.Foreground* & *coloredstring.util.Background*:* Red
* Green
* Blue
* Yellow
* Brown
* Gray
* White
* Black
* Magenta
* Cyan
* Default
* DarkGray
* LightRed
* LightGreen
* LightBlue
* LightGray
* LightMagenta
* LightCyan
*coloredstring.util.Attribute*:* Bold
* Dim
* Underlined
* Reverse
* Blink
* Hidden
* Default
NOTE: Enumerations have method `get_color` for creating string with escape sequence**Classes:**
*coloredstring.ColoredString*:
Methods:
* Static:
* `render(string)` - renders string in specified [format](format.md)
* `success_message(message)` - renders message with leading green *" \* "*
* `info_message(message)` - renders message with leading cyan *" \* "*
* `warning_message(message)` - renders message with leading yellow *" \* "*
* `error_message(message)` - renders message with leading red *" \* "*
* `question_message(message)` - renders message with leading bold white *">>> "*
* Instance:
* `set_background_color(color_code)` - set's background color for object, `color_code` - code from enumeration
* `set_foreground_color(color_code)` - set's foreground color for object, `color_code` - code from enumeration
* `set_attribute(attribute_code)` - set's attribute for object, `attribute_code` - code from enumeration