
通过vscode执行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”即可运行.py文件。
相关文章教程推荐:vscode教程
以上就是vscode怎么运行.py文件的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号