为什么print()和input()在python的visual-studio-code中不起作用?

时间:2018-11-08 21:21:10

标签: python visual-studio-code

我刚刚为Python安装了visual-studio-code,并且可以运行脚本,但不能与控制台交互。如果我尝试执行print()input(),则会出现以下错误:

Exception has occurred: AttributeError
'NoneType' object has no attribute 'write'

我的launch.json对于终端如下所示:

{
    "name": "Python: Terminal (integrated)",
    "type": "python",
    "request": "launch",
    "program": "${file}",
    "console": "integratedTerminal"
}

这会导致错误: print('Hello')

0 个答案:

没有答案