Skip to main content

Impresión de texto coloreado y variables en consola

Project description

cprint

Imprime texto en consola con colores, permitiendo resaltar variables o expresiones dentro de llaves.

Instalación

pip install cprint

Uso básico

from cprint import cprint

nombre = 'Juan'
edad = 30
cprint('Mi nombre es {nombre} y tengo {edad} años', text_color='yellow', var_color='blue')

Opciones de color

  • text_color: Color del texto general. Ej: 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'black'.
  • var_color: Color de las variables/expresiones.
  • bright: Si es True, usa colores intensos (91, 92, etc).

Expresiones avanzadas

Puedes usar expresiones dentro de las llaves:

a = 5
b = 3
cprint('Suma: {a + b}', text_color='green', var_color='magenta')

Licencia

MIT

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

color_fprint-1.0.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

color_fprint-1.0.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file color_fprint-1.0.0.tar.gz.

File metadata

  • Download URL: color_fprint-1.0.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for color_fprint-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a323553e63956d6c1d2d8b9223ac6ea065072a78fc4923344d4b7c07938b8b1e
MD5 36d615cead5553876c24d20ccde0f4fb
BLAKE2b-256 105b850dab06c6d9b180fd586db4332ee92ef049068f6c27294d64480adb438a

See more details on using hashes here.

File details

Details for the file color_fprint-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: color_fprint-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for color_fprint-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2bc9c2f423fb958beb85c29c460bfed0e0fa4ebf528ccb524ac2ade7d8c2c41a
MD5 12c2c7d865bdfa216c953a2c4c5aa15f
BLAKE2b-256 6e0d831c966c4fbdd2bc602591d1924f549bc0ff2f150f9250dc1aefe784254e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page