Python3 EOFError After 8 Consecutive Inputs

154 views Asked by At

I'm not sure if I'm missing something here.

After 8 consecutive input statements my python 3 program (running in x64 Windows 7) crashes with an EOFError whenever it is run in command line/console. That is to say, after I've pressed [return] 7 times, it prints out the text for the input statement then immediately fails, not giving me a chance to input anything. The same issue occurs if I enter text for any/all of the inputs, with no change to the behaviour. This problem originated in a larger project however I've isolated it to this code:

#! py -3
input("1")
input("2")
input("3")
input("4")
input("5")
input("6")
input("7")
input("8") # The program crashes after the "8" is printed
input("9")

The program works flawlessly when executed in IDLE however whenever it is run in command (using Python 3.4.3) the below error occurs:

...
6
7
8Traceback (most recent call last):
  File "test.py", line 9, in <module>
    input("8")
EOFError

Is the program running out of memory or something related to that?

Thanks in advance for any help you can provide

EDIT: Added extra detail regarding platform

0

There are 0 answers