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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: color_fprint-0.1.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-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e9b1e202a365630d3dbd573b795e6b99b46cb4e26faf5cf71de23d25014a268
MD5 e1591e6da136599361490463b2d92dc5
BLAKE2b-256 ddcc9d29565e52d94c798a03f50172d6d36d409f91e6a0dd0ce240a161a93a33

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