Skip to main content

Read lines of data with an arbitrary delimiter, like a null, newline or even an x.

It passes pylint, passes pycodestyle, passes pydocstyle, is thoroughly unit tested, and runs on CPython 2.7, CPython 3.x, Pypy 7.3.1, and Pypy3 7.3.1.

It gains a lot of speed by eschewing single-character reads.

Usage looks like:
import readline0
file_ = open('/etc/shells', 'r')
for line in readline0.readline0(file_=file_, separator=b'\n'):
...     print(line)
...
b'# /etc/shells: valid login shells'
b'/bin/sh'
b'/bin/dash'
b'/bin/bash'
b'/bin/rbash'

Of course separator need not be a newline; it defaults to a null byte. Also file_ defaults to sys.stdin. And there’s a blocksize argument as well, which defaults to 64K.

Metadata

Release files for readline0 1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for readline0 1.7
File Size Uploaded
readline0-1.7.tar.gz 4.1 kB Details

Release files / readline0-1.7.tar.gz

Download URL readline0-1.7.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
505774f90826237f1228f6f0118b11bdb66824c8610322ced836a76247326791
BLAKE2b-256 checksum
How to use checksums
cdc3eb05bfc67e2a77bb38656a7e5dd56811019033d54aed3d19c50ea108e4a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

1.7 This release

1 release file

1.4

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page