chromaprint-0.5
توضیحات
Small package to facilitate colored terminal output.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | chromaprint-0.5 |
| نام | chromaprint |
| نسخه کتابخانه | 0.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | NoSmokingBandit |
| ایمیل نویسنده | nosmokingbandit@gmail.com |
| آدرس صفحه اصلی | https://github.com/nosmokingbandit/chromaprint |
| آدرس اینترنتی | https://pypi.org/project/chromaprint/ |
| مجوز | - |
chromaprint
===========
Python module to facilitate effortless color terminal output.
Installation
^^^^^^^^^^^^
Chromaprint requires Python 3.X.
Install via pip with ``pip install chromaprint``
Usage
^^^^^
.. code-block::
from chromaprint import print
print('green on magenta', fg='green', bg='magenta')
It's that easy.
Chromaprint contains one property ``colors`` and two methods ``print`` and ``set_default``.
colors
""""""
``chromaprint.colors`` is a tuple containing the names of all available colors. Attempts to use colors not in this tuple will raise an exception.
print()
"""""""
The ``print()`` method functions the same as Python's built-in print method. Simply pass any strings you wish to print with the foreground color as ``fg='green'`` and background color as ``bg='magenta'``. Color selections only apply to a single print, so the next ``print`` call will use the default colors. You can change the default colors using ``chromaprint.set_default()``
set_default()
"""""""""""""
A custom set of default colors may be specified and changed at will. Simply call ``set_default()`` using the same syntax as ``chromaprint.print()``\ , ie ``chromaprint.set_default(bg='green', fg='magenta')``. You may set either ``bg``\ , ``fg``\ , or both. To return to the system default color output pass ``bg='default', fg='default'``
نحوه نصب
نصب پکیج whl chromaprint-0.5:
pip install chromaprint-0.5.whl
نصب پکیج tar.gz chromaprint-0.5:
pip install chromaprint-0.5.tar.gz