Skip to main content

Load a text file as a string or a list of paragraphs (when splitlines is set to True) with blank lines removed

Project description

loadtext

pytestpythonCode style: blackLicense: MITPyPI - Version


Installation

pip install loadtext

Use

from loadtext import loadtext

# blank lines removed
string_text = loadtext("filename or filepath")
list_paragraphs = loadtext("filename or filepath", splitlines=True)
# or list_paragraphs = loadtext("filename or filepath", True)

License

loadtext is distributed under the terms of the MIT license.

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

loadtext-0.0.3.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

loadtext-0.0.3-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file loadtext-0.0.3.tar.gz.

File metadata

  • Download URL: loadtext-0.0.3.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.3

File hashes

Hashes for loadtext-0.0.3.tar.gz
Algorithm Hash digest
SHA256 59aceb65ef455f1835453a550a20663aa69aceee1a65d999257a51463ccd3ff4
MD5 6d6d88cfa5e83eb788972b25eda4b8c2
BLAKE2b-256 dc33ebc0e4c2b536a06fa082654c9431391a60a1b6498957776161d04ddf8967

See more details on using hashes here.

File details

Details for the file loadtext-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: loadtext-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.3

File hashes

Hashes for loadtext-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9f491589436e79b1fa9da9c8e12db018041a17191b517b3e40d57a0b0584873d
MD5 20b2bbd1d2c4e6b297970d54c62e01ce
BLAKE2b-256 84859bebc42c37b4efceac0b87d759451051e57a593b09447ae9d3571b8e60cb

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