下面的python代码在Visual Studio和Python IDLE中工作得非常好。但是,当我将其写入VISUAL STUDIO CODE中时,输入值后面的所有4个打印命令都不会被处理。VS代码没有处理输入后的python打印命令
print ('hello world')
print ('hello world')
message = raw_input ('type message ')
print ('message')
print ('statement 1')
print ('statement 2')
print ('statement 3')
print ('statement 4')
例如,当我填写在“我的信息”输入,它只是打印:
hello world
hello world
type message
my message
而且doesn't执行输入之后到来的4打印命令。 预期结果将是:
hello world
hello world
type message
my message
statement 1
statement 2
statement 3
statement 4
任何想法,为什么Visual Studio代码不处理,其余4个打印命令?
Thanks guys,for your contributions。实际上,错误不在代码中,但是由于VSC不支持从输出窗口直接输入。我只是想出了解决方案。见下文.... – rainer