当前位置: 首页 > 新闻动态 > 技术教程

vscode怎么运行.py文件

作者:尚 浏览: 发布日期:2020-01-10
[导读]:vscode运行.py文件的方法:先使用快捷键“ctrl+shifit+p”打开搜索栏,搜索打开tasks.json文件进行配置。然后使用快捷键“ctrl+shift+B”即可运行.py文件。

通过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教程

免责声明:转载请注明出处:http://www.sczxchw.cn/news/487927.html

扫一扫高效沟通

多一份参考总有益处

免费领取网站策划SEO优化策划方案

请填写下方表单,我们会尽快与您联系
感谢您的咨询,我们会尽快给您回复!