In a Textual app I have a function to call neovim. The idea is to jump out to a particular file, edit it, close it and return to the python app.
try:
result = subprocess.call(
["nvim", "path/to/file"])
self.label.content = str(result)
except BlockingIOError as e:
print(f"Caught BlockingIOError: {e}")
It successfully opens neovim, edits and saves the file but on closing neovim python crashes with:
BlockingIOError: [Errno 11] Resource temporarily unavailable
Much searching and reading about sockets and such has lead me here. What's the right way to go about this?