python-editor revival fork for dob (because python-editor has not been released in many years).
Original README
python-editor is a library that provides the editor module for programmatically interfacing with your system’s $EDITOR.
Examples
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.
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.
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.
Metadata
Release files for python-editor-hotoffthehamster 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| python_editor_hotoffthehamster-1.1.1.tar.gz | 29.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_editor_hotoffthehamster-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.5 kB
Release files / python_editor_hotoffthehamster-1.1.1.tar.gz
| Download URL | python_editor_hotoffthehamster-1.1.1.tar.gz |
|---|---|
| Size | 29.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e40a2b258c2cbb5678338d52445c20fe0c7ef0737c0c14392572c41ba99072be
|
|
BLAKE2b-256 checksum How to use checksums |
33edeafcaa419910b7ac3e0f7393855e227d6919d42df9aff291692d72807242
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / python_editor_hotoffthehamster-1.1.1-py3-none-any.whl
| Download URL | python_editor_hotoffthehamster-1.1.1-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f9cb6d4a53aea4ddce8c4d6b5fd773d5bb1d4c7338dadc88d9737d1ced643c2
|
|
BLAKE2b-256 checksum How to use checksums |
b0b43e534cca3ae3d6cff036cc6514d224ea44f6819f487b28e10a587c84fed3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for python-editor-hotoffthehamster 1.1.1
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.