by jp_sc · 5y ago · 0 comments
You can use this library for that: https://pypi.org/project/texteditor/
(Disclaimer: I’m the author)
There are several cases when you would want to do that, for example, think on the git CLI, that opens one so you can write a commit message, etc.
And is not only about using the EDITOR variable, most non-programmers doesn’t have one defined or it points to vim or something equally terrible for non technical users.