{"id":20491,"date":"2024-11-19T10:12:28","date_gmt":"2024-11-19T02:12:28","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20491\/"},"modified":"2024-11-19T10:12:28","modified_gmt":"2024-11-19T02:12:28","slug":"vscode%e6%80%8e%e4%b9%88%e8%bf%90%e8%a1%8c%e4%bb%a3%e7%a0%81python","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20491\/","title":{"rendered":"vscode\u600e\u4e48\u8fd0\u884c\u4ee3\u7801Python"},"content":{"rendered":"<blockquote><p>\n  \u5982\u4f55\u4f7f\u7528 vscode \u8fd0\u884c python \u4ee3\u7801\uff1f\u76f4\u63a5\u8fd0\u884c python \u6587\u4ef6\uff1a\u5728 vscode \u4e2d\u521b\u5efa .py \u6587\u4ef6\uff0c\u5199\u5165\u4ee3\u7801\uff0c\u7136\u540e\u70b9\u51fb\u8fd0\u884c\u6309\u94ae\u6216\u4f7f\u7528 f5 \u5feb\u6377\u952e\u3002\u4f7f\u7528\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\uff1a\u6253\u5f00\u7ec8\u7aef\uff0c\u5bfc\u822a\u5230 python \u6587\u4ef6\u76ee\u5f55\uff0c\u5e76\u4f7f\u7528 python [\u6587\u4ef6\u540d].py \u547d\u4ee4\u8fd0\u884c\u3002\u4f7f\u7528\u8c03\u8bd5\u5668\uff1a\u8bbe\u7f6e\u65ad\u70b9\uff0c\u542f\u52a8\u8c03\u8bd5\u5668\uff0c\u7136\u540e\u9010\u6b65\u6267\u884c\u4ee3\u7801\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/03\/2024040301151955237.jpg\" class=\"aligncenter\" title=\"vscode\u600e\u4e48\u8fd0\u884c\u4ee3\u7801Python\u63d2\u56fe\" alt=\"vscode\u600e\u4e48\u8fd0\u884c\u4ee3\u7801Python\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 VSCode \u4e2d\u8fd0\u884c Python \u4ee3\u7801<\/strong><\/p>\n<h3>\u76f4\u63a5\u8fd0\u884c Python \u6587\u4ef6<\/h3>\n<ol>\n<li> <strong>\u6253\u5f00 VSCode \u5e76\u521b\u5efa Python \u6587\u4ef6\uff1a<\/strong>\u6253\u5f00\u6216\u521b\u5efa\u4e00\u4e2a\u4ee5 .py \u7ed3\u5c3e\u7684\u6587\u4ef6\u3002<\/li>\n<li> <strong>\u5199\u5165 Python \u4ee3\u7801\uff1a<\/strong>\u5728\u6587\u4ef6\u4e2d\u5199\u5165\u4f60\u7684 Python \u4ee3\u7801\u3002<\/li>\n<li> <strong>\u70b9\u51fb\u201c\u8fd0\u884c\u201d\u6309\u94ae\u6216\u4f7f\u7528\u5feb\u6377\u952e F5\uff1a<\/strong>\u8fd9\u5c06\u4f7f\u7528 Python \u89e3\u91ca\u5668\u8fd0\u884c\u6587\u4ef6\u3002<\/li>\n<\/ol>\n<h3>\u4f7f\u7528\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26<\/h3>\n<ol>\n<li> <strong>\u6253\u5f00\u5185\u7f6e\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\uff1a<\/strong>\u5728 VSCode \u4e2d\uff0c\u6309 Ctrl + ~\uff08Windows\/Linux\uff09\u6216 Cmd + ~\uff08Mac\uff09\u6253\u5f00\u5185\u7f6e\u7ec8\u7aef\u3002<\/li>\n<li> <strong>\u5bfc\u822a\u5230 Python \u6587\u4ef6\u76ee\u5f55\uff1a<\/strong>\u4f7f\u7528 cd \u547d\u4ee4\u5bfc\u822a\u5230\u5305\u542b Python \u6587\u4ef6\u7684\u76ee\u5f55\u3002<\/li>\n<li>\n<p><strong>\u8fd0\u884c Python \u547d\u4ee4\uff1a<\/strong>\u5728\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>python [\u6587\u4ef6\u540d].py<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ol>\n<h3>\u4f7f\u7528\u8c03\u8bd5\u5668<\/h3>\n<ol>\n<li> <strong>\u8bbe\u7f6e\u65ad\u70b9\uff1a<\/strong>\u5728\u4f60\u60f3\u8c03\u8bd5\u7684\u4ee3\u7801\u884c\u4e0a\u5355\u51fb\u9f20\u6807\u5de6\u952e\u3002<\/li>\n<li> <strong>\u542f\u52a8\u8c03\u8bd5\u5668\uff1a<\/strong>\u5355\u51fb VSCode \u4e2d\u7684\u201c\u8c03\u8bd5\u201d\u9009\u9879\u5361\u6216\u4f7f\u7528\u5feb\u6377\u952e F5\u3002<\/li>\n<li> <strong>\u9010\u6b65\u6267\u884c\u4ee3\u7801\uff1a<\/strong>\u4f7f\u7528\u8c03\u8bd5\u5668\u4e2d\u7684\u6309\u94ae\u9010\u6b65\u6267\u884c\u4ee3\u7801\uff0c\u4f8b\u5982\u201c\u6b65\u5165\u201d\u548c\u201c\u6b65\u8fc7\u201d\u3002<\/li>\n<\/ol>\n<h3>\u5176\u4ed6\u65b9\u6cd5<\/h3>\n<p><strong>\u4f7f\u7528\u6269\u5c55\uff1a<\/strong><\/p>\n<ul>\n<li>Python Extension Pack\uff1a\u63d0\u4f9b\u81ea\u52a8\u8865\u5168\u3001\u8bed\u6cd5\u9ad8\u4eae\u548c\u8c03\u8bd5\u7b49\u529f\u80fd\u3002<\/li>\n<\/ul>\n<p><strong>\u4f7f\u7528\u5916\u90e8 Python \u73af\u5883\uff1a<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<ul>\n<li>\u8bbe\u7f6e VSCode \u4ee5\u4f7f\u7528\u5916\u90e8 Python \u73af\u5883\u3002\u8fd9\u5141\u8bb8\u4f60\u7ba1\u7406\u4e0d\u540c\u7684 Python \u7248\u672c\u548c\u5305\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u8fd0\u884c\u4ee3\u7801Python\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4f7f\u7528 vscode \u8fd0\u884c python \u4ee3\u7801\uff1f\u76f4\u63a5\u8fd0\u884c python \u6587\u4ef6\uff1a\u5728 vscode \u4e2d\u521b\u5efa .py \u6587\u4ef6\uff0c\u5199\u5165\u4ee3\u7801\uff0c\u7136\u540e\u70b9\u51fb\u8fd0\u884c\u6309\u94ae\u6216\u4f7f\u7528 f5 \u5feb\u6377\u952e\u3002\u4f7f\u7528\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\uff1a\u6253\u5f00\u7ec8\u7aef\uff0c\u5bfc\u822a\u5230 python \u6587\u4ef6\u76ee\u5f55\uff0c\u5e76\u4f7f\u7528 python [\u6587\u4ef6\u540d].py \u547d\u4ee4\u8fd0\u884c\u3002\u4f7f\u7528\u8c03\u8bd5\u5668\uff1a\u8bbe\u7f6e\u65ad\u70b9\uff0c\u542f\u52a8\u8c03\u8bd5\u5668\uff0c\u7136\u540e\u9010\u6b65\u6267\u884c\u4ee3\u7801\u3002 \u5982\u4f55\u5728 VSCode \u4e2d\u8fd0\u884c Python \u4ee3\u7801 \u76f4\u63a5\u8fd0\u884c Python \u6587\u4ef6 \u6253\u5f00 VSCode \u5e76\u521b\u5efa Python \u6587\u4ef6\uff1a\u6253\u5f00\u6216\u521b\u5efa\u4e00\u4e2a\u4ee5 .py \u7ed3\u5c3e\u7684\u6587\u4ef6\u3002 \u5199\u5165 Python \u4ee3\u7801\uff1a\u5728\u6587\u4ef6\u4e2d\u5199\u5165\u4f60\u7684 Python \u4ee3\u7801\u3002 \u70b9\u51fb\u201c\u8fd0\u884c\u201d\u6309\u94ae\u6216\u4f7f\u7528\u5feb\u6377\u952e F5\uff1a\u8fd9\u5c06\u4f7f\u7528 Python \u89e3\u91ca\u5668\u8fd0\u884c\u6587\u4ef6\u3002 \u4f7f\u7528\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26 \u6253\u5f00\u5185\u7f6e\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\uff1a\u5728 VSCode \u4e2d\uff0c\u6309 Ctrl + ~\uff08Windows\/Linux\uff09\u6216 Cmd + ~\uff08Mac\uff09\u6253\u5f00\u5185\u7f6e\u7ec8\u7aef\u3002 \u5bfc\u822a\u5230 Python \u6587\u4ef6\u76ee\u5f55\uff1a\u4f7f\u7528 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-20491","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=20491"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20491\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}