{"id":291,"date":"2021-08-12T01:13:00","date_gmt":"2021-08-12T01:13:00","guid":{"rendered":"https:\/\/262235.xyz\/?p=291"},"modified":"2021-08-12T01:13:00","modified_gmt":"2021-08-12T01:13:00","slug":"291","status":"publish","type":"post","link":"https:\/\/lyvba.com\/index.php\/2021\/08\/12\/291\/","title":{"rendered":"VS Code \u5b66\u4e60 Python \u811a\u672c\u7f16\u7a0b IDE\u73af\u5883\u914d\u7f6e"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/08\/3627711294.jpg\" alt=\"VScode.jpg\" title=\"VScode.jpg\"><\/p>\n<h2>\u5b89\u88c5\u597d VS Code \u9ed8\u8ba4\u662f\u82f1\u6587\uff0c\u9996\u5148\u5b89\u88c5\u4e2d\u6587\u8bed\u8a00\u5305<\/h2>\n<ul>\n<li><code>Ctrl+Shiht+X<\/code> \u6253\u5f00 \u6269\u5c55\u63d2\u4ef6\u5b89\u88c5 \u8f93\u5165 <code>Chinese<\/code> \u641c\u7d22\uff0c \u9009\u62e9 <code>Chinese (Simplified) Language Pack<\/code> \u5b89\u88c5\u540e VS Code \u5c31\u80fd\u652f\u6301\u4e2d\u6587\u4e86<\/li>\n<li>\u9002\u7528\u4e8e VS Code \u7684\u4e2d\u6587\uff08\u7b80\u4f53\uff09\u8bed\u8a00\u5305\uff0c\u6b64\u4e2d\u6587\uff08\u7b80\u4f53\uff09\u8bed\u8a00\u5305\u4e3a VS Code \u63d0\u4f9b\u672c\u5730\u5316\u754c\u9762\u3002<\/li>\n<li>\u4f7f\u7528\u65b9\u6cd5<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u4f7f\u7528\u201c\u914d\u7f6e\u663e\u793a\u8bed\u8a00\u201d\u547d\u4ee4\u663e\u5f0f\u8bbe\u7f6e VS Code \u663e\u793a\u8bed\u8a00\uff0c\u53ef\u4ee5\u66ff\u4ee3\u9ed8\u8ba4 UI \u8bed\u8a00\u3002 \u6309 <code>Ctrl+Shift+P<\/code> \u4ee5\u663e\u793a\u201c\u547d\u4ee4\u9762\u677f\u201d\uff0c\u7136\u540e\u5f00\u59cb\u952e\u5165 <code>display<\/code> \u4ee5\u7b5b\u9009\u548c\u663e\u793a\u201c\u914d\u7f6e\u663e\u793a\u8bed\u8a00\u201d\u547d\u4ee4\u3002\u6309 <code>Enter<\/code>\uff0c\u7136\u540e\u4f1a\u6309\u533a\u57df\u8bbe\u7f6e\u663e\u793a\u5b89\u88c5\u7684\u8bed\u8a00\u5217\u8868\uff0c\u5e76\u7a81\u51fa\u663e\u793a\u5f53\u524d\u8bed\u8a00\u8bbe\u7f6e\u3002\u9009\u62e9\u53e6\u4e00\u4e2a\u201c\u8bed\u8a00\u201d\u4ee5\u5207\u6362 UI \u8bed\u8a00\u3002 \u8bf7\u53c2\u9605\u6587\u6863\u5e76\u83b7\u53d6\u66f4\u591a\u4fe1\u606f\u3002<\/p>\n<h2>\u5b89\u88c5 Python \u7f16\u7a0b\u8bed\u8a00\u6269\u5c55\u5305<\/h2>\n<ul>\n<li>\u6253\u5f00 \u6269\u5c55\u63d2\u4ef6\u5b89\u88c5\u9762\u677f\uff0c\u641c\u7d22 <code>@recommended:languages<\/code> \u6216\u8005 <code>Python<\/code> \uff0c\u5b89\u88c5 <code>Python extension for Visual Studio Code<\/code><\/li>\n<li>Python\u6269\u5c55\u4e3aVisual Studio\u4ee3\u7801<br \/>\u5728Visual Studio\u4ee3\u7801\u6269\u5c55\u4e0ePython\u8bed\u8a00\u4e30\u5bcc\u652f\u6301\uff08\u5bf9\u4e8e\u8bed\u8a00\u7684\u6240\u6709\u79ef\u6781\u652f\u6301\u7684\u7248\u672c\uff1a&gt; = 3.6\uff09\uff0c\u5305\u62ec\u7279\u5f81\uff0c\u4f8b\u5982\u667a\u80fd\u611f\u77e5\uff08Pylance\uff09\uff0c\u6389\u6bdb\uff0c\u8c03\u8bd5\uff0c\u4ee3\u7801\u5bfc\u822a\uff0c\u4ee3\u7801\u683c\u5f0f\uff0c\u91cd\u6784\uff0c\u53d8\u91cf\u8d44\u6e90\u7ba1\u7406\u5668\uff0c\u6d4b\u8bd5\u8d44\u6e90\u7ba1\u7406\uff0c\u4ee5\u53ca\u66f4\u591a\uff01<\/li>\n<li>\u5b89\u88c5\u7684\u6269\u5c55<\/li>\n<\/ul>\n<p>Python\u7684\u6269\u5c55\u5c06\u81ea\u52a8\u5b89\u88c5Pylance\u548cJupyter\u6269\u5c55\u4e0ePython\u6587\u4ef6\u548cJupyter\u7b14\u8bb0\u672c\u7535\u8111\u5de5\u4f5c\u65f6\uff0c\u7ed9\u4f60\u6700\u597d\u7684\u4f53\u9a8c\u3002\u4f46\u662f\uff0cPylance \u662f\u4e00\u4e2a\u53ef\u9009\u7684\u4f9d\u8d56\u9879\uff0c\u8fd9\u610f\u5473\u7740\u5982\u679c\u5b89\u88c5\u5931\u8d25\uff0cPython \u6269\u5c55\u5c06\u4fdd\u6301\u5b8c\u6574\u529f\u80fd\u3002\u60a8\u8fd8\u53ef\u4ee5\u5378\u8f7d\u5b83\u5728\u67d0\u4e9b\u529f\u80fd\u4e3a\u4ee3\u4ef7\u7684\uff0c\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f\u4e0d\u540c\u7684\u8bed\u8a00\u670d\u52a1\u5668\u3002<\/p>\n<ul>\n<li>\u5feb\u901f\u5f00\u59cb<\/li>\n<\/ul>\n<p>\u7b2c1\u6b65\uff1a\u60a8\u7684\u7cfb\u7edf\u4e0a\u5b89\u88c5Python\u652f\u6301\u7684\u7248\u672c\uff08\u6ce8\uff1a\u4e0d\u652f\u6301\uff0c\u8be5\u7cfb\u7edf\u5728Mac OS\u7684Python\u7684\u5b89\u88c5\uff09\u3002<br \/>\u7b2c2\u6b65\uff1a\u5b89\u88c5Python\u6269\u5c55\u4e3aVisual Studio\u4ee3\u7801\u3002<br \/>\u7b2c3\u6b65\uff1a\u6253\u5f00\u6216\u521b\u5efa\u4e00\u4e2aPython\u6587\u4ef6\uff0c\u5e76\u5f00\u59cb\u7f16\u7801\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/08\/233973932.png\" alt=\"welcome.png\" title=\"welcome.png\"><\/p>\n<h2>\u5b89\u88c5 <code>Code Runner<\/code> \u6587\u4ef6\u680f\uff0c\u589e\u52a0\u8fd0\u884c\u25b3\u56fe\u6807\uff0c\u65b9\u4fbf\u8fd0\u884c<\/h2>\n<ul>\n<li>\u4ee3\u7801\u8fd0\u884c\u5668<\/li>\n<\/ul>\n<p>\u8fd0\u884c\u591a\u79cd\u8bed\u8a00\u7684\u4ee3\u7801\u7247\u6bb5\u6216\u4ee3\u7801\u6587\u4ef6\uff1aC\u3001C++\u3001Java\u3001JavaScript\u3001PHP\u3001Python\u3001Perl\u3001Perl 6\u3001Ruby\u3001Go\u3001Lua\u3001Groovy\u3001PowerShell\u3001BAT\/CMD\u3001BASH\/SH\u3001F# Script\u3001F#\uff08 .NET Core)\u3001C# \u811a\u672c\u3001C# (.NET Core)\u3001VBScript\u3001TypeScript\u3001CoffeeScript\u3001Scala\u3001Swift\u3001Julia\u3001Crystal\u3001OCaml Script\u3001R\u3001AppleScript\u3001Elixir\u3001Visual Basic .NET\u3001Clojure\u3001Haxe\u3001Objective-C , Rust, Racket, Scheme, AutoHotkey, AutoIt, Kotlin, Dart, Free Pascal, Haskell, Nim, D, Lisp, Kit, V, SCSS, Sass, CUDA, Less, Fortran, \u548c\u81ea\u5b9a\u4e49\u547d\u4ee4<\/p>\n<h2>VS Code \u3010\u67e5\u770b\u3011-&gt;\u3010\u5916\u89c2\u3011-&gt;\u3010\u9762\u677f\u3011\u4e3b\u8981\u5feb\u952e<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/08\/3090452545.png\" alt=\"kk.png\" title=\"kk.png\"><\/p>\n<ul>\n<li>\u5207\u6362\u5e95\u4e0b\u8f93\u51fa\u548c\u7ec8\u7aef\u9762\u677f <code>Ctrl+J<\/code> ; \u5207\u6362\u4fa7\u680f <code>Ctrl+B<\/code> ;\u653e\u5927\u7f29\u5c0f <code>Ctrl+=<\/code> ;\u5176\u4ed6\u89c1\u56fe<\/li>\n<\/ul>\n<h2>Python \u4ee3\u7801\u683c\u5f0f\u5316 \u5feb\u6377\u952e <code>Shift+Alt+F<\/code> \uff0c\u53ef\u9009 <code>yapf<\/code> \u548c <code>autopep8<\/code><\/h2>\n<ul>\n<li>\n<p>\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u5e2e\u4f60\u5b89\u88c5 <code>yapf<\/code> \u6216\u8005 <code>autopep8<\/code> \u53ef\u4ee5\u6309\u4e0b\u9762\u547d\u4ee4\u5b89\u88c5<\/p>\n<pre><code>pip install yapf autopep8<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/08\/1749171291.png\" alt=\"pyformat.png\" title=\"pyformat.png\"><\/p>\n<\/li>\n<li>\u3010\u8bbe\u7f6e\u3011 \u641c\u7d22 <code>python.formatting.provider<\/code> \uff0c\u9009\u62e9\u4ee3\u7801\u6837\u5f0f\u5de5\u5177<\/li>\n<\/ul>\n<h3>\u3010\u9762\u677f\u3011\u7ec8\u7aef\u663e\u793a <code>\u5b8b\u4f53\u70b9\u9635\u5b57<\/code> \u8bbe\u7f6e: \u4fee\u6539<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/08\/1974051124.png\" alt=\"tm.png\" title=\"tm.png\"><\/p>\n<ul>\n<li>\n<p>\u3010\u8bbe\u7f6e\u3011 \u641c\u7d22 <code>terminal.integrated.fontFamily<\/code> \u4fee\u6539\u6210 <code>\u5b8b\u4f53<\/code>\uff0c\u6216\u8005\u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/p>\n<pre><code>\/\/ \u5c06\u8bbe\u7f6e\u653e\u5165\u6b64\u6587\u4ef6\u4e2d\u4ee5\u8986\u76d6\u9ed8\u8ba4\u8bbe\u7f6e\n{\n\"git.path\": \"C:\/soft\/Git\/cmd\/git.exe\",\n\"python.pythonPath\": \"D:\\Python38\\python.exe\",\n\"editor.renderWhitespace\": \"none\",\n\"editor.renderControlCharacters\": true,\n\"breadcrumbs.enabled\": false,\n\"workbench.sideBar.location\": \"left\",\n\"files.autoGuessEncoding\": true,\n\"explorer.confirmDelete\": false,\n\"terminal.integrated.fontFamily\": \"\u5b8b\u4f53\",\n\"http.proxySupport\": \"off\",\n\"editor.minimap.enabled\": false,\n\"editor.largeFileOptimizations\": false,\n\"debug.onTaskErrors\": \"debugAnyway\",\n\"workbench.colorTheme\": \"Visual Studio Dark\",\n\"editor.suggestSelection\": \"first\",\n\"python.defaultInterpreterPath\": \"D:\\Python38\\python.exe\",\n\"editor.fontLigatures\": false,\n\"editor.fontWeight\": 50,\n\"editor.fontSize\": 16,\n\"workbench.activityBar.visible\": false,\n}<\/code><\/pre>\n<h2>\u5b57\u4f53\u4f7f\u7528 Fixedsys \uff0c\u5b57\u4f53\u5927\u5c0f16px<\/h2>\n<\/li>\n<li>\n<p>Fixedsys Excelsior 3.01 <a href=\"https:\/\/github.com\/hongwenjun\/pillow_font\/raw\/main\/ttf\/fixedsys_excelsior.ttf\">\u5b57\u4f53\u4e0b\u8f7d<\/a><\/p>\n<pre><code>\"editor.fontFamily\": \"'Fixedsys Excelsior 3.01',Consolas, 'Courier New', monospace\"<\/code><\/pre>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5\u597d VS Code \u9ed8\u8ba4\u662f\u82f1\u6587\uff0c\u9996\u5148\u5b89\u88c5\u4e2d\u6587\u8bed\u8a00\u5305 Ctrl+Shiht+X \u6253\u5f00 \u6269\u5c55\u63d2\u4ef6\u5b89\u88c5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,12],"tags":[45,50],"class_list":["post-291","post","type-post","status-publish","format-standard","hentry","category-soft","category-learn","tag-python","tag-vscode"],"_links":{"self":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/comments?post=291"}],"version-history":[{"count":0,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/291\/revisions"}],"wp:attachment":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media?parent=291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/categories?post=291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/tags?post=291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}