{ "info": { "author": "Stefan H. Holek", "author_email": "stefan@epy.co.at", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython" ], "description": "=====\nkmd\n=====\n--------------------------------------------------------\nAn interpreter framework\n--------------------------------------------------------\n\nOverview\n============\n\n**kmd** allows to build command line driven shells\nwith powerful tab-completion capabilities.\n\nThe kmd.Kmd class derives from `cmd.Cmd`_ and extends it in the\nfollowing ways:\n\n1. Instead of Python's readline_ module, kmd.Kmd uses the alternative\n rl_ readline bindings.\n\n2. Setup and tear-down of the readline completer have been moved to *preloop*\n and *postloop* respectively. Subclasses must make sure to call their\n parents' implementations.\n\n3. Incomplete command names are automatically expanded if they are unique.\n\n4. Command aliases can be defined by extending the *aliases* dictionary.\n Alias names apply to all *do_*, *complete_*, and *help_* attributes.\n\n5. Lines starting with '#' are treated as comments. The new *comment* method\n is invoked, receiving the line as argument.\n\n6. It is now possible to configure the *shell_escape_chars*.\n The default is '!'.\n\n7. If a *history_file* is set, kmd.Kmd loads and saves the history\n in *preloop* and *postloop*.\n\n8. The new *run* method encapsulates the full execution cycle of a Kmd.\n\n.. _`cmd.Cmd`: https://docs.python.org/3/library/cmd.html\n.. _readline: https://docs.python.org/3/library/readline.html\n\nPackage Contents\n================\n\nkmd.Kmd\n Implements the mechanics of a command shell, based on `cmd.Cmd`_.\n\nkmd.completions\n Implements a set of ready-to-use completions.\n\nkmg.quoting\n Defines constants and functions for writing completions.\n\nCompletions\n===========\n\nFilenameCompletion\n Complete names of files and directories on the filesystem.\n\nUsernameCompletion\n Complete names of users known to the system.\n\nHostnameCompletion\n Complete names of hosts in the system's ``/etc/hosts`` file.\n\nEnvironmentCompletion\n Complete names of variables in the process environment.\n\nCommandCompletion\n Complete names of executables on the system PATH.\n\nDocumentation\n=============\n\nFor further details please refer to the `API Documentation`_.\n\n.. _`API Documentation`: https://kmd.readthedocs.io/en/stable/\n\nDevelopment\n===========\n\nkmd development is hosted on GitHub_ where it also has an `issue tracker`_.\n\n.. _GitHub: https://github.com/stefanholek/kmd\n.. _`issue tracker`: https://github.com/stefanholek/kmd/issues\n\nInstallation\n============\n\nInstallation requires Python 2.7 or higher.\n\nNote: kmd uses the rl_ library which contains a C extension. It is a good idea\nto review its `installation instructions`_ and make sure all dependencies are\nin place.\n\nTo install the ``kmd`` package, type::\n\n pip install kmd\n\n.. _rl: https://github.com/stefanholek/rl\n.. _`installation instructions`: https://github.com/stefanholek/rl#installation\n\n\nChangelog\n=========\n\n2.3 - 2019-03-20\n----------------\n\n- Clear lastcmd when EOF is hit to avoid an infinite loop. See Python\n `issue 13500`_.\n [stefan]\n\n- Drop explicit GPL because the PSF license is GPL-compatible anyway.\n [stefan]\n\n- Update filename completion with new hooks.\n [stefan]\n\n- Stop hiding the quoting module in completions and make it available as\n *kmd.quoting*.\n [stefan]\n\n- Stop using *rl.completer.reset* because it overrides ~/.inputrc.\n [stefan]\n\n- Stop using 2to3.\n [stefan]\n\n- Require rl >= 3.0.\n [stefan]\n\n.. _`issue 13500`: https://bugs.python.org/issue13500\n\n2.2 - 2012-05-10\n----------------\n\n- String and filename quoting was not respected when *Kmd.run*\n was called with arguments.\n [stefan]\n\n- Switch to a happier looking Sphinx theme.\n [stefan]\n\n- Require rl >= 2.2.\n [stefan]\n\n2.1.2 - 2012-04-14\n------------------\n\n- Update documentation more.\n [stefan]\n\n2.1.1 - 2012-03-29\n------------------\n\n- Update documentation.\n [stefan]\n\n2.1 - 2011-11-05\n----------------\n\n- Add *Kmd.input* method as extension point for subclasses.\n [stefan]\n\n- Make sure hostname completion survives a missing hosts file.\n [stefan]\n\n- Require rl >= 2.0.1.\n [stefan]\n\n2.0 - 2011-10-06\n----------------\n\n- Add *Kmd.aliases* dictionary to define command aliases.\n [stefan]\n\n- Refactor *Kmd.do_help* for easier customization.\n [stefan]\n\n- Make sure error messages go to stderr.\n [stefan]\n\n- Switch to pretty Sphinx-based docs.\n [stefan]\n\n- Require rl >= 2.0.\n [stefan]\n\n1.0 - 2011-07-14\n----------------\n\n- Initial release.\n", "description_content_type": "", "docs_url": "https://pythonhosted.org/kmd/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/stefanholek/kmd", "keywords": "command line shell", "license": "PSFL", "maintainer": "", "maintainer_email": "", "name": "kmd", "package_url": "https://pypi.org/project/kmd/", "platform": "", "project_url": "https://pypi.org/project/kmd/", "project_urls": { "Homepage": "https://github.com/stefanholek/kmd" }, "release_url": "https://pypi.org/project/kmd/2.3/", "requires_dist": null, "requires_python": "", "summary": "An interpreter framework", "version": "2.3" }, "last_serial": 4962474, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "719332dc4010827b69ab7116e019b424", "sha256": "5cc77e539bfa93235c63380b8fe6013cadcf00b2f8d6ff633edb23b0f17c169c" }, "downloads": -1, "filename": "kmd-1.0.zip", "has_sig": false, "md5_digest": "719332dc4010827b69ab7116e019b424", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18770, "upload_time": "2011-07-14T20:01:37", "url": "https://files.pythonhosted.org/packages/94/6d/a38d4a7ea013ba0f79e398e6a44b8d9c23120383a8a72ad46c170a7255e6/kmd-1.0.zip" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "9115b13e5f0c71d225efd67d6279a318", "sha256": "58146f5cfee5018baabd517e8b5e6652877deabe20470edaa386775401a3c9e2" }, "downloads": -1, "filename": "kmd-2.0.zip", "has_sig": false, "md5_digest": "9115b13e5f0c71d225efd67d6279a318", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25275, "upload_time": "2011-10-06T18:39:07", "url": "https://files.pythonhosted.org/packages/dc/56/eca16d2a1219d79add3efec976827e0a5307e54b85eb06e107dd771c9040/kmd-2.0.zip" } ], "2.1": [ { "comment_text": "", "digests": { "md5": "efe4f886be792bbb3e25f4c59b4873cb", "sha256": "56a8f623248c7ba9177470ae9a4bf04e57344d03f9576f527ff1f9c1a8f14858" }, "downloads": -1, "filename": "kmd-2.1.zip", "has_sig": false, "md5_digest": "efe4f886be792bbb3e25f4c59b4873cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34880, "upload_time": "2011-11-05T18:28:56", "url": "https://files.pythonhosted.org/packages/a8/15/4041010501b660e022cc480c46c77f6056c223feb3d3c56b7b54b02cbff7/kmd-2.1.zip" } ], "2.1.1": [ { "comment_text": "", "digests": { "md5": "1d73106521e5c2690fcf069161c4533b", "sha256": "7ca9c03f94dbd7ff60fc4b8e8aa9c36d78d30756377614824219f81578101d76" }, "downloads": -1, "filename": "kmd-2.1.1.zip", "has_sig": false, "md5_digest": "1d73106521e5c2690fcf069161c4533b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35238, "upload_time": "2012-03-29T16:09:01", "url": "https://files.pythonhosted.org/packages/6a/23/82f195ab0f94b35c91b48d4d540518848c9cfd6fd23f469a681ff50757a1/kmd-2.1.1.zip" } ], "2.1.2": [ { "comment_text": "", "digests": { "md5": "60509cc224a37f423d4927d7bcdccc4c", "sha256": "adef430cf90aeec3868039e23b2e5d9b5048f01c0f08d3225396ba59a3bc03f6" }, "downloads": -1, "filename": "kmd-2.1.2.zip", "has_sig": false, "md5_digest": "60509cc224a37f423d4927d7bcdccc4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35340, "upload_time": "2012-04-14T09:50:53", "url": "https://files.pythonhosted.org/packages/ba/aa/4f33bac46e8e755118602d20919870ac08d4c95eab8084d4f6863638ca98/kmd-2.1.2.zip" } ], "2.2": [ { "comment_text": "", "digests": { "md5": "5bed21a34e3ae80df7b9583aa659aa58", "sha256": "f3b8adf9c87c9e4be6ac61decd674dbdf503f70694aa392956de29c74f2652ea" }, "downloads": -1, "filename": "kmd-2.2.zip", "has_sig": false, "md5_digest": "5bed21a34e3ae80df7b9583aa659aa58", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35649, "upload_time": "2012-05-10T15:17:59", "url": "https://files.pythonhosted.org/packages/99/08/d48e0bcb54a27525166f7f432464ab978c4cd81d6038b1d3eca679933c16/kmd-2.2.zip" } ], "2.3": [ { "comment_text": "", "digests": { "md5": "e8ff9be2e59cc37a4ee9f8ba6192f12c", "sha256": "b31964314be945c92026c3af1d173aba1bf6df169b2df5e9e79e82a7403b1a20" }, "downloads": -1, "filename": "kmd-2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e8ff9be2e59cc37a4ee9f8ba6192f12c", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 24924, "upload_time": "2019-03-20T08:17:47", "url": "https://files.pythonhosted.org/packages/74/4a/96f48de343e7e4eeccb2b20c646ab3ee46aadb8e8789cb2e0a41930f243a/kmd-2.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "388778d9e3abb566c7301ded4936070c", "sha256": "e5679ab37cbc94bda9dab6ba84277068d7bc3e581ff4db7cc58029bc0d9c5967" }, "downloads": -1, "filename": "kmd-2.3.zip", "has_sig": false, "md5_digest": "388778d9e3abb566c7301ded4936070c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39735, "upload_time": "2019-03-20T08:17:44", "url": "https://files.pythonhosted.org/packages/a0/9e/c42f44254a3999b94da957a40be3f9f53913b56ccb44c749e25ae61de0f3/kmd-2.3.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e8ff9be2e59cc37a4ee9f8ba6192f12c", "sha256": "b31964314be945c92026c3af1d173aba1bf6df169b2df5e9e79e82a7403b1a20" }, "downloads": -1, "filename": "kmd-2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e8ff9be2e59cc37a4ee9f8ba6192f12c", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 24924, "upload_time": "2019-03-20T08:17:47", "url": "https://files.pythonhosted.org/packages/74/4a/96f48de343e7e4eeccb2b20c646ab3ee46aadb8e8789cb2e0a41930f243a/kmd-2.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "388778d9e3abb566c7301ded4936070c", "sha256": "e5679ab37cbc94bda9dab6ba84277068d7bc3e581ff4db7cc58029bc0d9c5967" }, "downloads": -1, "filename": "kmd-2.3.zip", "has_sig": false, "md5_digest": "388778d9e3abb566c7301ded4936070c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39735, "upload_time": "2019-03-20T08:17:44", "url": "https://files.pythonhosted.org/packages/a0/9e/c42f44254a3999b94da957a40be3f9f53913b56ccb44c749e25ae61de0f3/kmd-2.3.zip" } ] }