call up an EDITOR (vim) from a python script

后端 未结 5 1522
故里飘歌
故里飘歌 2020-12-01 00:19

I want to call up an editor in a python script to solicit input from the user, much like crontab e or git commit does.

Here\'s a snippet fr

5条回答
  •  孤城傲影
    2020-12-01 00:50

    The PIPE is the problem. VIM is an application that depends on the fact that the stdin/stdout channels are terminals and not files or pipes. Removing the stdin/stdout paramters worked for me.

    I would avoid using os.system as it should be replaced by the subprocess module.

提交回复
热议问题