How not to mess terminal up after sys.stdin.read() and subprocess invoking vim?
How not to mess terminal up after sys.stdin.read() and subprocess invoking vim? Question: I want to create interactive mode code like git rebase -i HEAD~6 but for PIPE editing, stdin redirection. another example is vipe of moreutils. To do that, I learn this code below. # Source: https://stackoverflow.com/a/39989442/20307768 import sys, tempfile, os from subprocess import …