colourz-1.0.4
توضیحات
Colourz adds coloured text output and spinners to a Windows shell (Powershell / CMD)
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | colourz-1.0.4 |
| نام | colourz |
| نسخه کتابخانه | 1.0.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Alex Macniven |
| ایمیل نویسنده | apmacniven@outlook.com |
| آدرس صفحه اصلی | https://github.com/alexmacniven/colourz.git |
| آدرس اینترنتی | https://pypi.org/project/colourz/ |
| مجوز | MIT |
# colourz
Colourz adds coloured text output and spinners to a Windows shell (Powershell / CMD)
## Installation
`$ pipenv install colourz`
## Usage
```python
import colourz
# Print in bold text
print(colourz.bold("Bold text"))
# Print text in red
print(colourz.normal("Red text", "RED"))
# Print text in bold red
print(colourz.bold("Bold red text", "RED"))
# Use Bullets when waiting on a long task
import time
def main():
s = colourz.Bullets()
print("Doing long task...")
s.start()
long_task()
s.stop()
print("Success!")
# CAUTION: As Bullets is threaded, we need to watch out for exceptions
def long_task():
raise LongTaskError
def main():
s = colourz.Bullets()
print("Doing long task...")
s.start()
try:
long_task()
msg = "Success!"
except LongTaskError:
msg = "Fail!"
finally:
s.stop()
print(msg)
```
نیازمندی
| مقدار | نام |
|---|---|
| - | colorama |
نحوه نصب
نصب پکیج whl colourz-1.0.4:
pip install colourz-1.0.4.whl
نصب پکیج tar.gz colourz-1.0.4:
pip install colourz-1.0.4.tar.gz