Skip to content
Myr

Added bold argument to ANSI colour examples

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Implicitly reinforces the idea that styling as well as colouring can be done with the click.style() function.

authored by Kevin Yap · committed by Kevin Yap · parent c42e93c · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:docs/utils.rst+3 added-3 removed
57 unmodified lines
58To install `colorama`, run this command::5960 $ pip install colorama6162For styling a string the :func:`style` function can be used::62For styling a string, the :func:`style` function can be used::6364 import click6566 click.echo(click.style('Hello World!', fg='green'))67 click.echo(click.style('Some more text', bg='blue', fg='white'))68 click.echo(click.style('ATTENTION', blink=True))68 click.echo(click.style('ATTENTION', blink=True, bold=True))6970The combination of :func:`echo` and :func:`style` is also available in71a single function called :func:`secho`::7273 click.secho('Hello World!', fg='green')74 click.secho('Some more text', bg='blue', fg='white')75 click.secho('ATTENTION', blink=True)75 click.secho('ATTENTION', blink=True, bold=True)767778.. _colorama: https://pypi.python.org/pypi/colorama79
257 unmodified lines