Skip to main content
travisci PyPI Package latest release Supported versions Supported implementations Wheel packaging support Test line coverage

ansiwrap wraps text, like the standard textwrap module. But it also correctly wraps text that contains ANSI control sequences that colorize or style text.

Where textwrap is fooled by the raw string length of those control codes, ansiwrap is not; it understands that however much those codes affect color and display style, but have no logical length.

The API mirrors the wrap and fill functions of textwrap.

See also the enclosed demo.py.

https://content.screencast.com/users/jonathaneunice/folders/Jing/media/8db64be2-01cc-4da4-b46a-789c53c63b44/00000569.png

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansiwrap-0.5.3.zip (13.7 kB view details)

Uploaded Source

Built Distribution

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

ansiwrap-0.5.3-py2.py3-none-any.whl (7.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ansiwrap-0.5.3.zip.

File metadata

  • Download URL: ansiwrap-0.5.3.zip
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ansiwrap-0.5.3.zip
Algorithm Hash digest
SHA256 eea5bfb372296c7147fae595bdca016c5c8f18e39a743f42e2265a4d67b2b145
MD5 95317765c2c24a0eedeadd386100498b
BLAKE2b-256 0a485b0e45ed3f4c6192849b617525aca62ff3aa517f65420d9d81272d87b77f

See more details on using hashes here.

File details

Details for the file ansiwrap-0.5.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ansiwrap-0.5.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4fb30218ea5f4cbf212bc017285de295cf3f3ee0bcb81fb89fcd2f5fb59801eb
MD5 b97c3a30aed7d01a0d6538b9d29c8cf7
BLAKE2b-256 1274b23c8d4b81371349296b31ab9fcb9e5a495a899e68e56d3f9f0474c2b362

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 Sentry Error logging StatusPage Status page