while True:
reply = input('Enter text')
if reply == 'stop': break
print(reply.upper())
The result was:
Enter text:Traceback (most recent call last):
File "C:PythonProjects5.py", line 2, in <module>
reply = input('Enter text:')
EOFError: EOF when reading a line
[Finished in 0.2s with exit code 1]
It is only in Sublime Text 2. I tried IDLE, tried command line, everything is perfect.
Why should Subleme shout at me?
By the way, maybe you could also explain my what EOF may mean in such situation. Of course, I have read in the documentation, that if EOF is read from input, the appropriate error is raised. I would like to model this situation. Is input only about the keyboard? If yes, what combination of keys should I input to get EOF?
Thank you in advance.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…