我刚刚安装了 VS Code 并尝试在其上测试一个基本的 python 计算器,它接受原始输入值,但是我无法在编辑器中写入任何输入,因为它显示消息 Cannot edit in read-唯一的编辑器
。有没有办法更改此设置或绕过它并以不同的方式输入值?
这是计算器:
degC = input("What is the temp in Celsius?")
degF = int(degC) * 9/5 + 32
print (str(degC) + " degrees Celsius = " + str(degF) + " degrees Fahrenheit")
我希望能够在编辑器中提示时输入一个值,但我无法这样做。
最佳答案
您可以从终端调用脚本,例如
python yourScript.py
或
C:\Python27\python.exe C:..\yourScript.py
关于python - 有没有办法更改 Visual Studio Code 中编辑器的只读设置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55970671/