首頁 > 開發工具 > VSCode > 主體

vscode怎麼運行.py文件

發布: 2020-01-10 15:48:15
原創
4818 人瀏覽過

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中文網其他相關文章!

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
最新問題
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!