Skip to main content

Readlike

A Python module that provides GNU Readline-like line editing functions (the default Emacs-style ones). If you just want to use Readline, use the readline package in the standard library–but this package allows access to those capabilties in settings outside of a standard CLI.

Currently, all stateless Readline commands are implemented. This means that yanking and history are not supported.

This module is especially well-suited to interfacing with Urwid due to a shared syntax for describing key inputs.

Installation

Install or upgrade to the latest version from PyPI:

[sudo] pip install -U readlike

Quick example

Transpose words:

>>> import readlike
>>> readlike.edit('perilous siege', 9, 'meta t')
('siege perilous', 14)

Commands

Implemented commands and their correspondings keys are as follows:

backward-char            ctrl b, left
backward-delete-char     ctrl h, backspace
backward-kill-word       ctrl meta h, meta backspace
backward-word            meta b, meta left
beginning-of-line        ctrl a, home
capitalize-word          meta c
delete-char              ctrl d, delete
delete-horizontal-space  meta \
downcase-word            meta l
end-of-line              ctrl e, end
forward-char             ctrl f, right
forward-word             meta f, meta right
kill-line                ctrl k
kill-word                meta d, meta delete
transpose-chars          ctrl t
transpose-words          meta t
unix-line-discard        ctrl u
unix-word-rubout         ctrl w
upcase-word              meta u

For more information about each command, see readline(3) or see the doc strings in readlike.py.

Projects using Readlike

Metadata

Release files for readlike 0.1.3

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

Source distribution (sdist)

Source distribution for readlike 0.1.3
File Size Uploaded Provenance Actions
readlike-0.1.3.tar.gz 5.0 kB Without provenance Details for readlike-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for readlike 0.1.3
File Interpreter ABI Platform Actions
readlike-0.1.3-py3-none-any.whl Python 3 none any Details for readlike-0.1.3-py3-none-any.whl

Total release size: 9.7 kB

Release files / readlike-0.1.3.tar.gz

Download URL readlike-0.1.3.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4486ba5f1c1770dc6458316ecb95ea12e1ba7f59f328804fa17a8212b743fc08
BLAKE2b-256 checksum
How to use checksums
2b2d8b281b3c2c14efd4105f90a83d886a69c8a1f6d6c2c20f1c55a8d65822ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / readlike-0.1.3-py3-none-any.whl

Download URL readlike-0.1.3-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a87a179ac7badc174883d88baddb37a5f8cbb4fe533a5fa2ffc3563b14fe2601
BLAKE2b-256 checksum
How to use checksums
7102d639167c3ed84b9c3040bc99ed97be67796b53635f0c4f23392918428324
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for readlike 0.1.3

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.

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