Python raw_input following sys.stdin.read() throws EOFError

前端 未结 2 1333
不思量自难忘°
不思量自难忘° 2021-01-05 09:21

a similar question has been asked before, but the answers suggested a workaround which is not applicable to my situation.

An email message is piped from mutt to a sc

2条回答
  •  时光说笑
    2021-01-05 10:14

    Try to reset STDIN using sys.stdin.seek(0)

    Reference: http://docs.python.org/library/fileinput.html

提交回复
热议问题