How to Handle EOFError for raw_input() in python in Mac OS X

前端 未结 1 1571
情深已故
情深已故 2021-01-13 01:44

My python program has two calls to raw_input()

The first raw_input() is to take multiline input from the user. The user can issue Ctrl+D (

相关标签:
1条回答
  • 2021-01-13 02:01

    It's quite normal that when standard input is terminated (by hitting control-D, in Unix-derived systems -- I think it's control-Z in Windows), it stays terminated thereafter (unless you close and re-open it in the meantime, of course).

    0 讨论(0)
提交回复
热议问题