| 1 |
Metadata-Version: 1.1 |
| 2 |
Name: readlike |
| 3 |
Version: 0.1.3 |
| 4 |
Summary: GNU Readline-like line editing module |
| 5 |
Home-page: https://github.com/jangler/readlike |
| 6 |
Author: Brandon Mulcahy |
| 7 |
Author-email: [email protected] |
| 8 |
License: MIT |
| 9 |
Description: Readlike |
| 10 |
======== |
| 11 |
|
| 12 |
A Python module that provides `GNU Readline`_-like line editing functions (the |
| 13 |
default Emacs-style ones). If you just want to use Readline, use the readline_ |
| 14 |
package in the standard library--but this package allows access to those |
| 15 |
capabilties in settings outside of a standard CLI. |
| 16 |
|
| 17 |
Currently, all stateless Readline commands are implemented. This means that |
| 18 |
yanking and history are not supported. |
| 19 |
|
| 20 |
This module is especially well-suited to interfacing with Urwid_ due to a |
| 21 |
shared syntax for describing key inputs. |
| 22 |
|
| 23 |
Installation |
| 24 |
------------ |
| 25 |
|
| 26 |
Install or upgrade to the latest version from PyPI_:: |
| 27 |
|
| 28 |
[sudo] pip install -U readlike |
| 29 |
|
| 30 |
Quick example |
| 31 |
------------- |
| 32 |
|
| 33 |
Transpose words:: |
| 34 |
|
| 35 |
>>> import readlike |
| 36 |
>>> readlike.edit('perilous siege', 9, 'meta t') |
| 37 |
('siege perilous', 14) |
| 38 |
|
| 39 |
Commands |
| 40 |
-------- |
| 41 |
|
| 42 |
Implemented commands and their correspondings keys are as follows:: |
| 43 |
|
| 44 |
backward-char ctrl b, left |
| 45 |
backward-delete-char ctrl h, backspace |
| 46 |
backward-kill-word ctrl meta h, meta backspace |
| 47 |
backward-word meta b, meta left |
| 48 |
beginning-of-line ctrl a, home |
| 49 |
capitalize-word meta c |
| 50 |
delete-char ctrl d, delete |
| 51 |
delete-horizontal-space meta \ |
| 52 |
downcase-word meta l |
| 53 |
end-of-line ctrl e, end |
| 54 |
forward-char ctrl f, right |
| 55 |
forward-word meta f, meta right |
| 56 |
kill-line ctrl k |
| 57 |
kill-word meta d, meta delete |
| 58 |
transpose-chars ctrl t |
| 59 |
transpose-words meta t |
| 60 |
unix-line-discard ctrl u |
| 61 |
unix-word-rubout ctrl w |
| 62 |
upcase-word meta u |
| 63 |
|
| 64 |
For more information about each command, see readline(3) or see the doc |
| 65 |
strings in readlike.py_. |
| 66 |
|
| 67 |
Projects using Readlike |
| 68 |
----------------------- |
| 69 |
|
| 70 |
- hangups_ |
| 71 |
|
| 72 |
.. _GNU Readline: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html |
| 73 |
.. _readline: https://docs.python.org/3/library/readline.html |
| 74 |
.. _PyPI: https://pypi.python.org/pypi/readlike |
| 75 |
.. _Urwid: http://urwid.org/ |
| 76 |
.. _readlike.py: https://github.com/jangler/readlike/blob/master/readlike.py |
| 77 |
.. _hangups: https://github.com/tdryer/hangups |
| 78 |
|
| 79 |
Keywords: line editing,readlike,readline,urwid |
| 80 |
Platform: UNKNOWN |
| 81 |
Classifier: Development Status :: 5 - Production/Stable |
| 82 |
Classifier: Intended Audience :: Developers |
| 83 |
Classifier: License :: OSI Approved :: MIT License |
| 84 |
Classifier: Operating System :: OS Independent |
| 85 |
Classifier: Programming Language :: Python :: 2 |
| 86 |
Classifier: Programming Language :: Python :: 2.7 |
| 87 |
Classifier: Programming Language :: Python :: 3 |
| 88 |
Classifier: Programming Language :: Python :: 3.4 |
| 89 |
Classifier: Programming Language :: Python |
| 90 |
Classifier: Topic :: Software Development :: Libraries :: Python Modules |
| 91 |
Classifier: Topic :: Text Processing |