繁体   English   中英

在再次运行 python 程序之前,每次都必须在 Visual Studio 代码终端中键入 exit() 吗?

[英]Have to type exit() every time in visual studio code terminal before running python program again?

我正在使用 Visual Studio 代码运行一个简单的程序,但是每次我在终端中运行程序时,一旦完成它就会卡住,就好像我还在终端中的 python 中一样。 我这样说是因为在我完成程序后它给我留下了三个箭头。

>>>>"

(ie I need to go down to the integrated terminal window in VSC and type exit() before I run the program again or it will throw invalid syntax errors because VSC is trying to use bash command line commands while I am still in python.

终端

您可以 select Run Python File in Terminal而不是Run Selection/Line in Python Terminal ,等于单击 VSCode 左上角的运行按钮。

如果你想退出 python,你也可以使用Ctrl+Z的快捷键。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM