Skip to main content

Lightweight package for colored text in python.

Project description

Usage

Usage Params Return Value
ansiprint() str: msg, str: color-name/ansi, str: end, boolean: flush str: msg
ansi() str: color-name/ansi str: ansi
clear() None: None None: None

Examples


ansiprint()

Code:

ansiprint("This is red!","red")
ansiprint("This is blue!","blue")
ansiprint("This is white and ends with \"!\"",end="!")

Result: result


ansi()

Code:

print(ansi("red") + "This is red!" + ansi("reset"))
print(ansi("blue") + "This is blue!" + ansi("reset"))
print(ansi(34) + "This is the ansi \"34\"!" + ansi("reset")) # ansi codes are in the ansi chart below

Result: result


clear()

Code:

print("This message isn't seen because the console is cleared after!")
clear()
print("This message is seen because it is after the console is cleared!")

Result: result


Ansi Chart

ansi chart

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

AnsiPrint-0.0.7.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

AnsiPrint-0.0.7-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file AnsiPrint-0.0.7.tar.gz.

File metadata

  • Download URL: AnsiPrint-0.0.7.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for AnsiPrint-0.0.7.tar.gz
Algorithm Hash digest
SHA256 d2971ed6f4e1750c00901ed93efa0a9183a2c57184d8981fe74947159aacefc9
MD5 70fb3ee33e953eed777f01f2c2aa697f
BLAKE2b-256 62346b9b31349df656d153ff054bfb7f15edd69199fee6786f8818da0895200e

See more details on using hashes here.

File details

Details for the file AnsiPrint-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: AnsiPrint-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for AnsiPrint-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c777d23d583664e41f848802bcae7196fb6286d952e7f28a9fcc0074983ca32d
MD5 633cfda9123d20f536f3e5d84472d1cb
BLAKE2b-256 16052aad6e0f8128a31fb88ea97d132a5ad77f7f60f0d9c09e650f5beb629cfd

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