The parawrap module is an extended version of the built-in textwrap module. Like the standard module, it provides two convenience functions, wrap() and fill(). It also provides ParagraphWrapper, which is the class that does all the work. In addition, there is a split() function that splits up paragraphs.
- parawrap.wrap(text[, width[, …]])
Wraps text (a string) so every line is at most width characters long. Respects paragraph breaks, which are lines separated by multiple newlines. Returns a list of output lines, without final newlines.
Optional keyword arguments correspond to the instance attributes of ParagraphWrapper, which mirrors textwrap.TextWrapper. width defaults to 70.
- parawrap.fill(text[, width[, …]])
Wraps text and returns a single string containing the wrapped paragraphs. fill() is shorthand for:
"\n".join(wrap(text, ...))
In particular, fill() accepts exactly the same keyword arguments as wrap().
- parawrap.split(text)
Splits text into multiple paragraphs, returning a list of paragraphs.
Installation
To install from PyPi:
$ pip install parawrap
You can get a copy of the source by using:
$ git clone https://github.com/ecometrica/parawrap.git
Note that this program requires Python 2.6 or higher.
Reporting bugs and submitting patches
Please check our issue tracker for known bugs and feature requests.
We accept pull requests for fixes and new features.
Credits
Simon Law wrote this program, with the generous support of Ecometrica.
Metadata
Release files for parawrap 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| parawrap-1.0.tar.gz | 3.0 kB | Without provenance | Details for parawrap-1.0.tar.gz |
Release files / parawrap-1.0.tar.gz
| Download URL | parawrap-1.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9524990cd30fa46864cfefb50b29277be458de879ab4fb4a305265a4c10d59a0
|
|
BLAKE2b-256 checksum How to use checksums |
00a619edc0dce69f190680e212d8ef14507b4ff4684879acdbb551e352d54b1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for parawrap 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.