3

atom のatom-runnerを使用して Python コードを実行しようとしていますが、EOF エラーが返されます。同様の質問に対する他の回答を実行し、input() の代わりに raw_input() を配置しましたが、それでも EOF エラーが返されます。

これが私のコードです:

tempf = int(raw_input("What is the temperature in fahrenheit?  "))
tempc = (tempf - 32) * 5 / 9
print("The temperature in celsius is", tempc, "degrees.")

エラーは次のとおりです。

What is the temperature in fahrenheit?  
Traceback (most recent call last):
File "C:\Documents\Programming\Python\f2c.py", line 1, in <module>
    tempf = int(raw_input("What is the temperature in fahrenheit?  "))
EOFError: EOF when reading a line
4

1 に答える 1

1

コメントからの回答をまとめると、現状ではatom-runnerSTDIN がサポートされていないため、リンクされた問題は次のように回答されました。

ありがとう!誰かがこれをサポートするためにプルリクエストをまとめたいと思った場合、おそらく受け入れられるでしょう (見た目が良く、何も壊れていない場合)。

ただし、正しく指摘されているように、スクリプト パッケージを使用することで、探しているものを実現できる可能性があります。

于 2016-04-29T12:38:48.150 に答える