Skip to main content

Library for wrapping text to widths

Project description

textwrapper

Function signature

def wrap_text(
        # the text to wrap
        text,

        # a line's minimum width before wrapping
        min_width=1,

        # the max width of lines. default is shell width
        max_width=shutil.get_terminal_size().columns,

        # number of columns to pad off of max_width
        padding_size=0,

        # a string to start all wrapped lines with
        prefix='',

        # a string to end all lines which wrap with
        suffix='',

        # string of characters, in priority order, to wrap on
        delimiters=' ,.!',
        ):

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

texttool-0.0.1.tar.gz (1.5 kB view details)

Uploaded Source

Built Distribution

texttool-0.0.1-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file texttool-0.0.1.tar.gz.

File metadata

  • Download URL: texttool-0.0.1.tar.gz
  • Upload date:
  • Size: 1.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for texttool-0.0.1.tar.gz
Algorithm Hash digest
SHA256 cba996c2e19df1164a4b8cee4e9c8354393b4dbe0b829ae610b0427850399281
MD5 477941a2e1ee60c95bd702875d039e75
BLAKE2b-256 f12c5c0034482ba77a833b0e4a25fe9420b000889bd00b664c2bbeb1ee4a14d9

See more details on using hashes here.

File details

Details for the file texttool-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: texttool-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for texttool-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ad3f0982229e3728efc96b7b9487cf751ac3d9935b4fb27165fa3c02779736a9
MD5 96646fc1062aa61c1818d839afb07343
BLAKE2b-256 01760824f1896a29111b474b694214269a826815002feb5243c053e50dbbb638

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