Library for wrapping text to widths
Project description
textwrapper
Installation
pip isntall texttool
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=' ,.!',
):
Usage
import texttool
Project details
Release history Release notifications | RSS feed
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.2.tar.gz
(2.7 kB
view details)
Built Distribution
File details
Details for the file texttool-0.0.2.tar.gz
.
File metadata
- Download URL: texttool-0.0.2.tar.gz
- Upload date:
- Size: 2.7 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe0f6e8ede779a4a5d609251b89ae16b90fb32122187b9181276e746cc65ba00 |
|
MD5 | ba03877b516513f236e7bbb970b715fb |
|
BLAKE2b-256 | 0a1fe21b132b3e4dcbb30ff6bcdde753fb6acb495beb76723b829e2f85788ed1 |
File details
Details for the file texttool-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: texttool-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.7 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f73c89d17f52aa63ed7a732fed25194dd924b85d495b64a2f6f086079f17407 |
|
MD5 | 07323f27688f77fb78ae6e090d047223 |
|
BLAKE2b-256 | dbfb48863b16341b4ab9cffe11a3d1afda5d3f5d594c1e50b9dfe2c3f2fb9750 |