Skip to main content

anstrip is a minimal library to strip ANSI sequences from strings.

Project description

anstrip

PyPI

anstrip is a minimal library to strip ANSI sequences from strings.

It provides:

  • PATTERN, the regex pattern used by the functions of anstrip
  • strip, a function to remove all the escape sequences from a string
  • auto_strip, a function that is similar to strip, except that it only removes if the output is a TTY
  • print, a function that is similar to the built-in print but with sequence auto-stripping
  • printed_length, a function that returns the length of the string as seen on the screen

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

anstrip-0.2.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

anstrip-0.2.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file anstrip-0.2.2.tar.gz.

File metadata

  • Download URL: anstrip-0.2.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for anstrip-0.2.2.tar.gz
Algorithm Hash digest
SHA256 eb959e44d2513d4453c576ed0c15e49bc278dc5175cff78a9dcb551c6341af6e
MD5 8367c3b55c1de669df45189835eb876f
BLAKE2b-256 ca466793b9564f5132cae98d9bfef46f73f3b5f160265d1c9aeea84726af3365

See more details on using hashes here.

File details

Details for the file anstrip-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: anstrip-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for anstrip-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 52d19b8c2d83ed60afbb0306bd88377d87832b69a78966e8357e32e6e9973032
MD5 fd407200ac93a14e2c2c880712c45b1a
BLAKE2b-256 32cdef72268605e99026d43a2ce523a9cddd1416285e35f8f2c4fbaa384696d6

See more details on using hashes here.

Supported by

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