首頁  >  文章  >  開發工具  >  vscode怎麼運行.py文件

vscode怎麼運行.py文件

尚
原創
2020-01-10 15:48:154820瀏覽

vscode怎麼運行.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教學

#

以上是vscode怎麼運行.py文件的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn