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.2.zip (13.3 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.2-py2.py3-none-any.whl (7.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ansiwrap-0.5.2.zip.

File metadata

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

File hashes

Hashes for ansiwrap-0.5.2.zip
Algorithm Hash digest
SHA256 1130e147d31ac56754611b4e7738a0f4c04869979fc09a16bb45e986a98ab8d3
MD5 3ee3d924d73c5993a3b8c514e366fb2f
BLAKE2b-256 058ab6005dfbd34293765b1d0db1a6b32f1bb262bd66bc65219027a1eb674c88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ansiwrap-0.5.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e1a2017760a0ad076d74a9a1281b4cc6dfaf9d91510d4069e992fd279f4158f4
MD5 7586fbb59553aaf4685c7e7e9de6baa2
BLAKE2b-256 29e84eab88deeba6ae9710672a34c3f89df4c5412251dd45a8306ec20c917424

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