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

Uploaded Python 2Python 3

File details

Details for the file ansiwrap-0.5.1.zip.

File metadata

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

File hashes

Hashes for ansiwrap-0.5.1.zip
Algorithm Hash digest
SHA256 e5ccca7bd59923389f1c4c558dc0d6e5f5c13c50a9a41d75756feab246c311ec
MD5 241bf71077aec4d7049f6d8d4b4f23cf
BLAKE2b-256 f87e5da0a56585be2ac555c1332d5bf9734740b62089d92c681e6ccec10af127

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ansiwrap-0.5.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bdcd91dd891f6bbbc503d7fbadad0f9ed20f95f5e65723d9fd43aba382f770b8
MD5 6b8cca8a4fcfc0b724568c307bd36dc6
BLAKE2b-256 d19070707461417bfc259a164c9dc5333051bc7e040286a830dba379ff3be20c

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