小編給大家分享一下vscode運(yùn)行.py文件的方法,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!
通過vscode執(zhí)行python程序的方法:
先配置 tasks.json :
使用快捷鍵“ ctrl+shifit+p”打開搜索欄。輸入 “Tasks: Configure Task Runner”打開tasks.json
{ "version": "0.1.0", // The command is tsc. Assumes that tsc has been installed using npm install -g typescript "command": "C:/Python27/python.exe", // The command is a shell script "isShellCommand": true, // Show the output window only if unrecognized errors occur. "showOutput": "always", // args is the HelloWorld program to compile. "args": ["${file}"] }
配置完成后使用快捷鍵“ctrl+shift+B”即可運(yùn)行.py文件。
看完了這篇文章,相信你對“vscode運(yùn)行.py文件的方法”有了一定的了解,如果想了解更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝各位的閱讀!