python-editor
python-editor copied to clipboard
Programmatically open an editor, capture the result.
I've tested this and as far as I can tell it doesn't break anything (at least on Windows).
On Windows I get an error. This is because `tmp = tempfile.NamedTemporaryFile(suffix=suffix)` (line 84) opens and locks the file. This can be fixed by calling `tmp.close()` directly afterwards but I...
Hello when building packages rpmbuild get error `*** ERROR: ambiguous python shebang in /lib/python3.8/site-packages/editor.py: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.`
It is not always intended to read the file back, so adding a flag that users can decide.
Fixes #11.
common case is our users will have EDITOR set to `gvim -f` which causes editor to crash.
Trying to get a message doing the following: `msg = editor.edit(contents=b"PO# ")` instead the editor hangs and my Mac's fans kick in. It works when running as admin but right...
> import editor > commit_msg = editor.edit(contents=b"# Enter commit message here") This works in the python3 command line (while exhibiting bug #1), but when called as a script I get...
`editor.edit('file')` fails when the defined `$EDITOR` contains spaces: $ touch /tmp/file $ export EDITOR='vim -v' $ python -c 'import editor; editor.edit("/tmp/file")' Traceback (most recent call last): File "", line 1,...