{"id":20602,"date":"2024-11-19T15:40:18","date_gmt":"2024-11-19T07:40:18","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20602\/"},"modified":"2024-11-19T15:40:18","modified_gmt":"2024-11-19T07:40:18","slug":"sublime%e6%80%8e%e4%b9%88%e5%86%99python","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20602\/","title":{"rendered":"sublime\u600e\u4e48\u5199python"},"content":{"rendered":"<blockquote><p>\n  \u5728 sublime text \u4e2d\u7f16\u5199 python \u4ee3\u7801\u9700\u8981\uff1a1. \u5b89\u88c5 sublimerepl \u63d2\u4ef6\uff1b2. \u914d\u7f6e python \u89e3\u91ca\u5668\u8def\u5f84\uff1b3. \u521b\u5efa\u6269\u5c55\u540d\u4e3a &#8220;.py&#8221; \u7684\u65b0\u6587\u4ef6\uff1b4. \u4f7f\u7528 sublimerepl \u7684\u529f\u80fd\u7f16\u5199 python \u4ee3\u7801\uff1b5. \u901a\u8fc7\u83dc\u5355\u6216\u547d\u4ee4\u884c\u8fd0\u884c\u4ee3\u7801\uff1b6. \u4f7f\u7528 sublimerepl \u7684\u8c03\u8bd5\u529f\u80fd\u67e5\u627e\u548c\u4fee\u590d\u9519\u8bef\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/03\/2024040307542155049.jpg\" class=\"aligncenter\" title=\"sublime\u600e\u4e48\u5199python\u63d2\u56fe\" alt=\"sublime\u600e\u4e48\u5199python\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 Sublime Text \u4e2d\u7f16\u5199 Python<\/strong><\/p>\n<p>Sublime Text \u662f\u4e00\u6b3e\u6d41\u884c\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u4ee5\u5176\u5f3a\u5927\u7684\u529f\u80fd\u548c\u53ef\u81ea\u5b9a\u4e49\u6027\u800c\u95fb\u540d\u3002\u5b83\u4e5f\u662f\u7f16\u5199 Python \u4ee3\u7801\u7684\u7406\u60f3\u9009\u62e9\u3002<\/p>\n<p><strong>\u8bbe\u7f6e<\/strong><\/p>\n<p>\u5728 Sublime Text \u4e2d\u7f16\u5199 Python \u4ee3\u7801\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u6267\u884c\u4ee5\u4e0b\u8bbe\u7f6e\uff1a<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<ol>\n<li> <strong>\u5b89\u88c5 Python \u63d2\u4ef6\uff1a<\/strong>\u901a\u8fc7 Package Control \u5b89\u88c5 SublimeREPL \u63d2\u4ef6\uff0c\u5b83\u5c06\u4e3a Python \u4ee3\u7801\u63d0\u4f9b\u8bed\u6cd5\u9ad8\u4eae\u3001\u81ea\u52a8\u5b8c\u6210\u548c\u8c03\u8bd5\u7b49\u529f\u80fd\u3002<\/li>\n<li> <strong>\u914d\u7f6e Python \u89e3\u91ca\u5668\uff1a<\/strong>\u5728 &#8220;Preferences &gt; Settings &#8211; User&#8221; \u4e2d\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u8bbe\u7f6e\uff1a<\/li>\n<\/ol>\n<pre>{\n  \"python_interpreter\": \"\/usr\/bin\/python3\"\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5c06\u5176\u66ff\u6362\u4e3a Python \u89e3\u91ca\u5668\u7684\u8def\u5f84\u3002<\/p>\n<p><strong>\u521b\u5efa\u4e00\u4e2a\u65b0\u6587\u4ef6<\/strong><\/p>\n<p>\u8981\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Python \u6587\u4ef6\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n<ol>\n<li>\u6253\u5f00 Sublime Text\u3002<\/li>\n<li>\u5355\u51fb &#8220;File &gt; New File&#8221;\u3002<\/li>\n<li>\u8f93\u5165\u4ee5\u4e0b\u6587\u4ef6\u6269\u5c55\u540d\uff1a&#8221;.py&#8221;\u3002<\/li>\n<\/ol>\n<p><strong>\u7f16\u5199 Python \u4ee3\u7801<\/strong><\/p>\n<p>\u73b0\u5728\u4f60\u53ef\u4ee5\u5f00\u59cb\u7f16\u5199 Python \u4ee3\u7801\u4e86\u3002SublimeREPL \u63d2\u4ef6\u5c06\u63d0\u4f9b\u8bed\u6cd5\u9ad8\u4eae\u3001\u81ea\u52a8\u5b8c\u6210\u548c\u9519\u8bef\u63d0\u793a\u3002<\/p>\n<p><strong>\u8fd0\u884c Python \u4ee3\u7801<\/strong><\/p>\n<p>\u8981\u8fd0\u884c Python \u4ee3\u7801\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\u4e4b\u4e00\uff1a<\/p>\n<ol>\n<li> <strong>\u901a\u8fc7\u83dc\u5355\uff1a<\/strong>\u5355\u51fb &#8220;Tools &gt; Build System &gt; Python&#8221;\u3002<\/li>\n<li> <strong>\u901a\u8fc7\u547d\u4ee4\u884c\uff1a<\/strong>\u6309 Ctrl + B \uff08Windows\uff09\u6216 Cmd + B \uff08macOS\uff09\u3002<\/li>\n<\/ol>\n<p><strong>\u8c03\u8bd5 Python \u4ee3\u7801<\/strong><\/p>\n<p>SublimeREPL \u63d0\u4f9b\u8c03\u8bd5\u529f\u80fd\uff0c\u53ef\u5e2e\u52a9\u4f60\u67e5\u627e\u9519\u8bef\u548c\u4fee\u590d\u95ee\u9898\u3002\u8981\u8c03\u8bd5\u4ee3\u7801\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n<ol>\n<li>\u5728\u4ee3\u7801\u4e2d\u8bbe\u7f6e\u65ad\u70b9\u3002<\/li>\n<li>\u5355\u51fb &#8220;Tools &gt; Debug &gt; Start Debugging&#8221;\u3002<\/li>\n<li>\u4f7f\u7528\u65ad\u70b9\u63a7\u5236\u53f0\u6765\u6b65\u8fdb\u4ee3\u7801\u3001\u68c0\u67e5\u53d8\u91cf\u548c\u8c03\u7528\u51fd\u6570\u3002<\/li>\n<\/ol>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u5199\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>\u5728 sublime text \u4e2d\u7f16\u5199 python \u4ee3\u7801\u9700\u8981\uff1a1. \u5b89\u88c5 sublimerepl \u63d2\u4ef6\uff1b2. \u914d\u7f6e python \u89e3\u91ca\u5668\u8def\u5f84\uff1b3. \u521b\u5efa\u6269\u5c55\u540d\u4e3a &#8220;.py&#8221; \u7684\u65b0\u6587\u4ef6\uff1b4. \u4f7f\u7528 sublimerepl \u7684\u529f\u80fd\u7f16\u5199 python \u4ee3\u7801\uff1b5. \u901a\u8fc7\u83dc\u5355\u6216\u547d\u4ee4\u884c\u8fd0\u884c\u4ee3\u7801\uff1b6. \u4f7f\u7528 sublimerepl \u7684\u8c03\u8bd5\u529f\u80fd\u67e5\u627e\u548c\u4fee\u590d\u9519\u8bef\u3002 \u5982\u4f55\u5728 Sublime Text \u4e2d\u7f16\u5199 Python Sublime Text \u662f\u4e00\u6b3e\u6d41\u884c\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u4ee5\u5176\u5f3a\u5927\u7684\u529f\u80fd\u548c\u53ef\u81ea\u5b9a\u4e49\u6027\u800c\u95fb\u540d\u3002\u5b83\u4e5f\u662f\u7f16\u5199 Python \u4ee3\u7801\u7684\u7406\u60f3\u9009\u62e9\u3002 \u8bbe\u7f6e \u5728 Sublime Text \u4e2d\u7f16\u5199 Python \u4ee3\u7801\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u6267\u884c\u4ee5\u4e0b\u8bbe\u7f6e\uff1a \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u5b89\u88c5 Python \u63d2\u4ef6\uff1a\u901a\u8fc7 Package Control \u5b89\u88c5 SublimeREPL \u63d2\u4ef6\uff0c\u5b83\u5c06\u4e3a Python \u4ee3\u7801\u63d0\u4f9b\u8bed\u6cd5\u9ad8\u4eae\u3001\u81ea\u52a8\u5b8c\u6210\u548c\u8c03\u8bd5\u7b49\u529f\u80fd\u3002 \u914d\u7f6e Python \u89e3\u91ca\u5668\uff1a\u5728 [&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-20602","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20602","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=20602"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20602\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}