Python EOF error when trying to run code
I'm trying to run python code with the atom-runner for atom, but it returns and EOF error. I did what other answers to similar questions said to do, and put raw_input() instead of input(), but it still returns and EOF error.
Here is my code:
tempf = int(raw_input("What is the temperature in fahrenheit? "))
tempc = (tempf - 32) * 5 / 9
print("The temperature in celsius is", tempc, "degrees.")
Here is the error:
What is the temperature in fahrenheit? Traceback (most recent call last): File "C:DocumentsProgrammingPythonf2c.py", line 1, in tempf = int(raw_input("What is the temperature in fahrenheit? ")) EOFError: EOF when reading a line
Drawing together the answers from the comments, as it stands atom-runner
does not support STDIN, the linked issue was responded to with:
Thanks! If someone wanted to put together a pull request to support this it would probably be accepted (if it looked good and didn't break anything, that is).
However, as quite rightly pointed out you can probably acheive what you are looking for by using the script package.
链接地址: http://www.djcxy.com/p/56456.html上一篇: 运行命令提示符命令