Python-Editline
===============
This is a package which is a replacement for GNU Readline for use as shell-completion support. It is designed to:
- link to libedit.so on the host system
(This covers most \*BSD based systems and Linux if you install libedit2 package)
- if no host libedit.so is available, libedit will be directly compiled into the extension itself
All code is released under the BSD-3 license, which makes this an alternative in cases where GNU-based readline is a problem.
Usage
-----
After a standard, uneventful installation, you should automatically have tab-completion using editline. This is configured in a sitecustomize.py file added to your install or virtual-env.
This extension has more extensive features than readline such as:
- tab-completion of imports by default
- tab-completion across arrays (so you can see/pick a valid index)
- tab-completion across dictionaries (displays available keys)
- Right-side prompts
- Arbitrary input/output/error streams so you can have multiple interpreters on a single Python instance which are fully independent. ('readline' uses C globals so you are stuck with just one instance)
The system is broken down in 3 components:
:_editline.so:
the C interface to libedit
:editline.py:
a Python subclass of _editline which implements much of the string parsing/manipulation
:lineeditor.py:
a general module which extends rlcompleter's functionality and provides additional features.
Again, by default this is entirely hidden.
Installation
------------
Handy tips for installation. 99.9% of folks will be able to use the default install (... by SDIST!). It will customize your build based on finding stuff.
In the (odd) case where you have libedit.so and you *really* want to have editline use the built-in version (say, your distro's libedit.so is borked) you can adjust the installer.
Run the pip install like this::
pip install --global-option="build" --global-option="--builtin-libedit" pyeditline
That will bypass the use of your local libedit.so. (... and if anyone has a better way to do this, I'm all ears.)
Gory Details?
-------------
Have a look at the README in the source repo or in readthedocs.io_ .
.. _readthedocs.io: http://python-editline.readthedocs.io/en/latest/
Raw data
{
"_id": null,
"home_page": "https://github.com/mark-nicholson/python-editline",
"name": "pyeditline",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Mark Nicholson",
"author_email": "nicholson.mark@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/68/6b/2fb61c72bc28198be5b4fdd45c695eeb36eb01680c6514453ebb7c44538a/pyeditline-2.0.1.tar.gz",
"platform": "",
"description": "Python-Editline\n===============\n\nThis is a package which is a replacement for GNU Readline for use as shell-completion support. It is designed to:\n\n- link to libedit.so on the host system\n (This covers most \\*BSD based systems and Linux if you install libedit2 package)\n- if no host libedit.so is available, libedit will be directly compiled into the extension itself\n\nAll code is released under the BSD-3 license, which makes this an alternative in cases where GNU-based readline is a problem.\n\nUsage\n-----\n\nAfter a standard, uneventful installation, you should automatically have tab-completion using editline. This is configured in a sitecustomize.py file added to your install or virtual-env.\n\nThis extension has more extensive features than readline such as:\n\n- tab-completion of imports by default\n- tab-completion across arrays (so you can see/pick a valid index)\n- tab-completion across dictionaries (displays available keys)\n- Right-side prompts\n- Arbitrary input/output/error streams so you can have multiple interpreters on a single Python instance which are fully independent. ('readline' uses C globals so you are stuck with just one instance)\n\nThe system is broken down in 3 components:\n\n:_editline.so:\n the C interface to libedit\n:editline.py:\n a Python subclass of _editline which implements much of the string parsing/manipulation\n:lineeditor.py:\n a general module which extends rlcompleter's functionality and provides additional features.\n\nAgain, by default this is entirely hidden.\n\n\nInstallation\n------------\n\nHandy tips for installation. 99.9% of folks will be able to use the default install (... by SDIST!). It will customize your build based on finding stuff.\n\nIn the (odd) case where you have libedit.so and you *really* want to have editline use the built-in version (say, your distro's libedit.so is borked) you can adjust the installer.\n\nRun the pip install like this::\n\n pip install --global-option=\"build\" --global-option=\"--builtin-libedit\" pyeditline\n\nThat will bypass the use of your local libedit.so. (... and if anyone has a better way to do this, I'm all ears.)\n\nGory Details?\n-------------\n\nHave a look at the README in the source repo or in readthedocs.io_ .\n\n.. _readthedocs.io: http://python-editline.readthedocs.io/en/latest/",
"bugtrack_url": null,
"license": "BSD",
"summary": "A fully functional command-line completion module built to directly interface with libedit.",
"version": "2.0.1",
"project_urls": {
"Homepage": "https://github.com/mark-nicholson/python-editline"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "686b2fb61c72bc28198be5b4fdd45c695eeb36eb01680c6514453ebb7c44538a",
"md5": "2699e52d7d0cede16e9238de7d2f8231",
"sha256": "171ce150489a7516031d8070a9da9a3f2c5d1c2a13e59c0e88e7c68d4905996a"
},
"downloads": -1,
"filename": "pyeditline-2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "2699e52d7d0cede16e9238de7d2f8231",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 217344,
"upload_time": "2020-02-19T00:32:43",
"upload_time_iso_8601": "2020-02-19T00:32:43.912769Z",
"url": "https://files.pythonhosted.org/packages/68/6b/2fb61c72bc28198be5b4fdd45c695eeb36eb01680c6514453ebb7c44538a/pyeditline-2.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2020-02-19 00:32:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mark-nicholson",
"github_project": "python-editline",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pyeditline"
}