先配置 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”即可运行.py文件。
相关文章教程推荐:vscode教程
以上就是vscode怎么运行.py文件的详细内容。
