@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
python-editor-hotoffthehamster
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
.. CXREF:
https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge
.. image:: https://github.com/doblabs/python-editor-hotoffthehamster/actions/workflows/checks-unspecial.yml/badge.svg?branch=release
:target: https://github.com/doblabs/python-editor-hotoffthehamster/actions/workflows/checks-unspecial.yml/badge.svg?branch=release
:alt: Build Status
.. CXREF: https://app.codecov.io/github.com/doblabs/python-editor-hotoffthehamster/settings/badge
.. image:: https://codecov.io/gh/doblabs/python-editor-hotoffthehamster/branch/release/graph/badge.svg?token=QghNXZq2YB
:target: https://app.codecov.io/gh/doblabs/python-editor-hotoffthehamster
:alt: Coverage Status
.. image:: https://readthedocs.org/projects/python-editor-hotoffthehamster/badge/?version=latest
:target: https://python-editor-hotoffthehamster.readthedocs.io/en/latest/
:alt: Documentation Status
.. image:: https://img.shields.io/github/v/release/doblabs/python-editor-hotoffthehamster.svg?style=flat
:target: https://github.com/doblabs/python-editor-hotoffthehamster/releases
:alt: GitHub Release Status
.. image:: https://img.shields.io/pypi/v/python-editor-hotoffthehamster.svg
:target: https://pypi.org/project/python-editor-hotoffthehamster/
:alt: PyPI Release Status
.. image:: https://img.shields.io/pypi/pyversions/python-editor-hotoffthehamster.svg
:target: https://pypi.org/project/python-editor-hotoffthehamster/
:alt: PyPI Supported Python Versions
.. image:: https://img.shields.io/github/license/doblabs/python-editor-hotoffthehamster.svg?style=flat
:target: https://github.com/doblabs/python-editor-hotoffthehamster/blob/release/LICENSE
:alt: License Status
.. |dob| replace:: ``dob``
.. _dob: https://github.com/doblabs/dob
.. |python-editor| replace:: ``python-editor``
.. _python-editor: https://github.com/fmoo/python-editor
|
|python-editor|_ revival fork for |dob|_ (because ``python-editor`` has not
been released `in many years <https://pypi.org/project/python-editor/>`__).
###############
Original README
###############
``python-editor`` is a library that provides the ``editor`` module for
programmatically interfacing with your system's $EDITOR.
Examples
========
.. code-block:: python
import editor
commit_msg = editor.edit(contents=b"# Enter commit message here")
Opens an editor, prefilled with the contents, ``# Enter commit message here``.
When the editor is closed, returns the contents (bytes) in variable ``commit_msg``.
Note that the argument to ``contents`` needs to be a bytes object on Python 3.
.. code-block:: python
editor.edit(file="README.txt")
Opens ``README.txt`` in an editor. Changes are saved in place. If there is
a ``contents`` argument then the file contents will be overwritten.
.. code-block:: python
editor.edit(..., use_tty=True)
Opens the editor in a TTY. This is usually done in programs which output is
piped to other programs. In this case the TTY is used as the editor's stdout,
allowing interactive usage.
How it Works
============
``editor`` first looks for the ``${EDITOR}`` environment variable. If set, it uses
the value as-is, without fallbacks.
If no $EDITOR is set, editor will search through a list of known editors, and
use the first one that exists on the system.
For example, on Linux, ``editor`` will look for the following editors in order:
* ``vim``
* ``emacs``
* ``nano``
When calling ``editor.edit``, an editor will be opened in a subprocess, inheriting
the parent process's stdin, stdout.
Raw data
{
"_id": null,
"home_page": "",
"name": "python-editor-hotoffthehamster",
"maintainer": "Tally Bark LLC",
"docs_url": null,
"requires_python": ">=3.8.1,<4.0.0",
"maintainer_email": "doblabs@tallybark.com",
"keywords": "editor,library,vim,emacs",
"author": "Landon Bouma",
"author_email": "doblabs@tallybark.com",
"download_url": "https://files.pythonhosted.org/packages/33/ed/eafcaa419910b7ac3e0f7393855e227d6919d42df9aff291692d72807242/python_editor_hotoffthehamster-1.1.1.tar.gz",
"platform": null,
"description": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\npython-editor-hotoffthehamster\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n\n.. CXREF:\n https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge\n\n.. image:: https://github.com/doblabs/python-editor-hotoffthehamster/actions/workflows/checks-unspecial.yml/badge.svg?branch=release\n :target: https://github.com/doblabs/python-editor-hotoffthehamster/actions/workflows/checks-unspecial.yml/badge.svg?branch=release\n :alt: Build Status\n\n.. CXREF: https://app.codecov.io/github.com/doblabs/python-editor-hotoffthehamster/settings/badge\n\n.. image:: https://codecov.io/gh/doblabs/python-editor-hotoffthehamster/branch/release/graph/badge.svg?token=QghNXZq2YB\n :target: https://app.codecov.io/gh/doblabs/python-editor-hotoffthehamster\n :alt: Coverage Status\n\n.. image:: https://readthedocs.org/projects/python-editor-hotoffthehamster/badge/?version=latest\n :target: https://python-editor-hotoffthehamster.readthedocs.io/en/latest/\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/github/v/release/doblabs/python-editor-hotoffthehamster.svg?style=flat\n :target: https://github.com/doblabs/python-editor-hotoffthehamster/releases\n :alt: GitHub Release Status\n\n.. image:: https://img.shields.io/pypi/v/python-editor-hotoffthehamster.svg\n :target: https://pypi.org/project/python-editor-hotoffthehamster/\n :alt: PyPI Release Status\n\n.. image:: https://img.shields.io/pypi/pyversions/python-editor-hotoffthehamster.svg\n :target: https://pypi.org/project/python-editor-hotoffthehamster/\n :alt: PyPI Supported Python Versions\n\n.. image:: https://img.shields.io/github/license/doblabs/python-editor-hotoffthehamster.svg?style=flat\n :target: https://github.com/doblabs/python-editor-hotoffthehamster/blob/release/LICENSE\n :alt: License Status\n\n.. |dob| replace:: ``dob``\n.. _dob: https://github.com/doblabs/dob\n\n.. |python-editor| replace:: ``python-editor``\n.. _python-editor: https://github.com/fmoo/python-editor\n\n|\n\n|python-editor|_ revival fork for |dob|_ (because ``python-editor`` has not\nbeen released `in many years <https://pypi.org/project/python-editor/>`__).\n\n###############\nOriginal README\n###############\n\n``python-editor`` is a library that provides the ``editor`` module for\nprogrammatically interfacing with your system's $EDITOR.\n\nExamples\n========\n\n.. code-block:: python\n\n import editor\n commit_msg = editor.edit(contents=b\"# Enter commit message here\")\n\nOpens an editor, prefilled with the contents, ``# Enter commit message here``.\nWhen the editor is closed, returns the contents (bytes) in variable ``commit_msg``.\nNote that the argument to ``contents`` needs to be a bytes object on Python 3.\n\n.. code-block:: python\n\n editor.edit(file=\"README.txt\")\n\nOpens ``README.txt`` in an editor. Changes are saved in place. If there is\na ``contents`` argument then the file contents will be overwritten.\n\n.. code-block:: python\n\n editor.edit(..., use_tty=True)\n\nOpens the editor in a TTY. This is usually done in programs which output is\npiped to other programs. In this case the TTY is used as the editor's stdout,\nallowing interactive usage.\n\nHow it Works\n============\n\n``editor`` first looks for the ``${EDITOR}`` environment variable. If set, it uses\nthe value as-is, without fallbacks.\n\nIf no $EDITOR is set, editor will search through a list of known editors, and\nuse the first one that exists on the system.\n\nFor example, on Linux, ``editor`` will look for the following editors in order:\n\n* ``vim``\n* ``emacs``\n* ``nano``\n\nWhen calling ``editor.edit``, an editor will be opened in a subprocess, inheriting\nthe parent process's stdin, stdout.\n\n",
"bugtrack_url": null,
"license": "Apache",
"summary": "Programmatically open an editor, capture the result",
"version": "1.1.1",
"project_urls": {
"documentation": "https://python-editor-hotoffthehamster.readthedocs.io/en/latest",
"download": "https://pypi.org/project/python-editor-hotoffthehamster/#files",
"history": "https://github.com/doblabs/python-editor-hotoffthehamster/blob/release/HISTORY.rst",
"homepage": "https://github.com/doblabs/python-editor-hotoffthehamster",
"issues": "https://github.com/doblabs/python-editor-hotoffthehamster/issues"
},
"split_keywords": [
"editor",
"library",
"vim",
"emacs"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b0b43e534cca3ae3d6cff036cc6514d224ea44f6819f487b28e10a587c84fed3",
"md5": "4e97e4af00bf9c601c1d3ef2acf9655f",
"sha256": "8f9cb6d4a53aea4ddce8c4d6b5fd773d5bb1d4c7338dadc88d9737d1ced643c2"
},
"downloads": -1,
"filename": "python_editor_hotoffthehamster-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4e97e4af00bf9c601c1d3ef2acf9655f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.1,<4.0.0",
"size": 8512,
"upload_time": "2023-12-28T03:40:22",
"upload_time_iso_8601": "2023-12-28T03:40:22.109258Z",
"url": "https://files.pythonhosted.org/packages/b0/b4/3e534cca3ae3d6cff036cc6514d224ea44f6819f487b28e10a587c84fed3/python_editor_hotoffthehamster-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "33edeafcaa419910b7ac3e0f7393855e227d6919d42df9aff291692d72807242",
"md5": "f3c1d2428c059b405063e52ef9e2ddd8",
"sha256": "e40a2b258c2cbb5678338d52445c20fe0c7ef0737c0c14392572c41ba99072be"
},
"downloads": -1,
"filename": "python_editor_hotoffthehamster-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "f3c1d2428c059b405063e52ef9e2ddd8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.1,<4.0.0",
"size": 29945,
"upload_time": "2023-12-28T03:40:24",
"upload_time_iso_8601": "2023-12-28T03:40:24.707664Z",
"url": "https://files.pythonhosted.org/packages/33/ed/eafcaa419910b7ac3e0f7393855e227d6919d42df9aff291692d72807242/python_editor_hotoffthehamster-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-28 03:40:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "doblabs",
"github_project": "python-editor-hotoffthehamster",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "python-editor-hotoffthehamster"
}