[英]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.