{"id":29418,"date":"2023-05-11T21:09:50","date_gmt":"2023-05-11T13:09:50","guid":{"rendered":"https:\/\/docs.pingcode.com\/?p=29418"},"modified":"2023-07-30T23:52:11","modified_gmt":"2023-07-30T15:52:11","slug":"%e6%9c%89%e5%93%aa%e4%ba%9b%e5%80%bc%e5%be%97%e6%8e%a8%e8%8d%90%e7%9a%84python%e5%bc%80%e5%8f%91%e5%b7%a5%e5%85%b7","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/29418.html","title":{"rendered":"\u6709\u54ea\u4e9b\u503c\u5f97\u63a8\u8350\u7684Python\u5f00\u53d1\u5de5\u5177"},"content":{"rendered":"<blockquote class=\"wp-block-quote\">\n<p>Python\u4ee3\u7801\u7f16\u8f91\u5668\u548cPython\u96c6\u6210\u5f00\u53d1\u5de5\u5177\u3002Python\u4ee3\u7801\u7f16\u8f91\u5668\u7684\u8f6f\u4ef6\u6709\uff1a1. Sublime Text\uff1b2. Vim\uff1b3. Atom\uff1b4. Visual Studio Code\u3002 Python\u96c6\u6210\u5f00\u53d1\u5de5\u5177\u7684\u8f6f\u4ef6\u6709\uff1a1. PyCharm\uff1b2. Eclipse + PyDev\uff1b3. Spyder\uff1b4. Thonny\u3002\u5176\u4e2d\uff0cSublime Text\u662f\u4e00\u6b3e\u975e\u5e38\u6d41\u884c\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u652f\u6301Python\u4ee3\u7801\u7f16\u8f91\u3002<\/p>\n<\/blockquote>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" alt=\"\" class=\"wp-image-29419\" decoding=\"async\" height=\"421\" sizes=\"(max-width: 680px) 100vw, 680px\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2023\/05\/\u6dfb\u52a0\u6807\u9898-33.png?x-oss-process=image\/auto-orient,1\/format,webp\" srcset=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2023\/05\/\u6dfb\u52a0\u6807\u9898-33.png?x-oss-process=image\/auto-orient,1\/format,webp 680w, https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2023\/05\/\u6dfb\u52a0\u6807\u9898-33-300x186.png 300w\" width=\"680\"\/><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001 Python\u4ee3\u7801\u7f16\u8f91\u5668<\/strong><\/h2>\n<p><strong>1. Sublime Text<\/strong><strong>\uff1a<\/strong>Sublime Text\u662f\u4e00\u6b3e\u975e\u5e38\u6d41\u884c\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u652f\u6301Python\u4ee3\u7801\u7f16\u8f91\uff0c\u540c\u65f6\u517c\u5bb9\u6240\u6709\u5e73\u53f0\uff0c\u5e76\u4e14\u4e30\u5bcc\u7684\u63d2\u4ef6\u6269\u5c55\u4e86\u8bed\u6cd5\u548c\u7f16\u8f91\u529f\u80fd\uff0c\u8fc5\u6377\u5c0f\u5de7\uff0c\u5177\u6709\u826f\u597d\u7684\u517c\u5bb9\u6027\uff0c\u5f88\u53d7\u7f16\u7a0b\u4eba\u58eb\u7684\u559c\u7231\uff01<\/p>\n<p><strong>2. Vim<\/strong><strong>\uff1a<\/strong>Vim\u548cVi\u662f\u4e00\u79cd\u6a21\u578b\u7f16\u8f91\u5668\uff0c\u5b83\u5c06\u6587\u672c\u67e5\u770b\u4ece\u6587\u672c\u7f16\u8f91\u4e2d\u5206\u79bb\uff0cVIM\u5728\u539f\u59cbVI\u4e4b\u4e0a\u505a\u4e86\u8bf8\u591a\u6539\u8fdb\uff0c\u5305\u62ec\u53ef\u6269\u5c55\u6a21\u578b\u548c\u5c31\u5730\u4ee3\u7801\u6784\u5efa\uff0cVIMScripts\u53ef\u7528\u4e8e\u5404\u79cdPython\u5f00\u53d1\u4efb\u52a1\uff01<\/p>\n<p><strong>3. Aom<\/strong><strong>\uff1a<\/strong>Atom\u88ab\u79f0\u4e3a\u201c21\u4e16\u7eaa\u53ef\u7834\u89e3\u7684\u6587\u672c\u7f16\u8f91\u5668\u201d\uff0c\u53ef\u4ee5\u517c\u5bb9\u6240\u6709\u5e73\u53f0\uff0c\u62e5\u6709\u65f6\u5c1a\u7684\u754c\u9762\u3001\u6587\u4ef6\u7cfb\u7edf\u6d4f\u89c8\u5668\u548c\u6269\u5c55\u63d2\u4ef6\u5e02\u573a\uff0c\u4f7f\u7528Electron\u6784\u5efa\uff0c\u5176\u8fd0\u884c\u65f6\u5b89\u88c5\u7684\u6269\u5c55\u63d2\u4ef6\u53ef\u652f\u6301Python\u8bed\u8a00\uff01<\/p>\n<p><strong>4. Visual Studio Code<\/strong><strong>\uff1a<\/strong>Visual Studio Code\u662f\u4e00\u6b3e\u517c\u5bb9Linux\u3001Mac OS X\u548cWindows \u5e73\u53f0\u7684\u5168\u529f\u80fd\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u53ef\u6269\u5c55\u5e76\u4e14\u53ef\u4ee5\u5bf9\u51e0\u4e4e\u6240\u6709\u4efb\u52a1\u8fdb\u884c\u914d\u7f6e\uff0c\u5bf9\u4e8ePython\u7684\u652f\u6301\u53ef\u4ee5\u5728Visual Studio Code\u4e2d\u5b89\u88c5\u63d2\u4ef6\uff0c\u53ea\u9700\u5feb\u901f\u70b9\u51fb\u6309\u94ae\u5373\u53ef\u6210\u529f\u5b89\u88c5\uff0c\u4e14\u53ef\u81ea\u52a8\u8bc6\u522bPython\u5b89\u88c5\u548c\u5e93\u3002<\/p>\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001 Python\u96c6\u6210\u5f00\u53d1\u73af\u5883<\/strong><\/h2>\n<p>1.\u00a0<strong>PyCharm<\/strong><strong>\uff1a<\/strong>PyCharm\u662f\u5c11\u6570\u4e00\u6b3e\u4e13\u95e8\u9762\u5411Python\u7684\u5168\u529f\u80fd\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0c\u540c\u6837\u62e5\u6709\u4ed8\u8d39\u7248\u548c\u514d\u8d39\u5f00\u6e90\u7248\uff0cPyCharm\u4e0d\u8bba\u662f\u5728Windows\u3001 Mac OS X\u7cfb\u7edf\u4e2d\uff0c\u8fd8\u662f\u5728Linux\u7cfb\u7edf\u4e2d\u90fd\u652f\u6301\u5feb\u901f\u5b89\u88c5\u548c\u4f7f\u7528\u3002<\/p>\n<p>\u5b83\u76f4\u63a5\u652f\u6301Python\u5f00\u53d1\u73af\u5883\uff0c\u6253\u5f00\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\u7136\u540e\u5c31\u53ef\u4ee5\u5f00\u59cb\u7f16\u5199\u4ee3\u7801\uff0c\u4e5f\u53ef\u4ee5\u5728PyCharm\u4e2d\u76f4\u63a5\u8fd0\u884c\u548c\u8c03\u8bd5Python\u7a0b\u5e8f\uff0c\u5b83\u8fd8\u652f\u6301\u6e90\u7801\u7ba1\u7406\u548c\u9879\u76ee\uff0c\u5e76\u4e14\u5176\u62e5\u6709\u4f17\u591a\u4fbf\u5229\u548c\u652f\u6301\u793e\u533a\uff0c\u80fd\u591f\u5feb\u901f\u638c\u63e1\u5b66\u4e60\u4f7f\u7528\u3002<\/p>\n<p>2.\u00a0<strong>Eclipse + PyDev<\/strong><strong>\uff1a<\/strong>PyDev\u662fEclipse\u96c6\u6210\u5f00\u53d1\u73af\u5883\u7684\u4e00\u4e2a\u63d2\u4ef6\uff0c\u652f\u6301Python\u8c03\u8bd5\u3001\u4ee3\u7801\u8865\u5168\u548c\u4ea4\u4e92\u5f0fPython\u63a7\u5236\u53f0\u7b49\uff0c\u5728Eclipse\u4e2d\u5b89\u88c5PyDev\u975e\u5e38\u4fbf\u6377\uff0c\u53ea\u9700\u4eceEclipse\u4e2d\u9009\u62e9\u201cHelp\u201d\u70b9\u51fb\u201cEclipse Marketplace\u201d\u7136\u540e\u641c\u7d22PyDev\uff0c\u70b9\u51fb\u5b89\u88c5\uff0c\u5fc5\u8981\u7684\u65f6\u5019\u91cd\u542fEclipse\u5373\u53ef\uff0c\u5bf9\u4e8e\u8d44\u6df1Eclipse\u5f00\u53d1\u8005\u6765\u8bf4\uff0cPyDev\u53ef\u4ee5\u5f88\u8f7b\u677e\u4e0a\u624b\u3002<\/p>\n<p>3. \u00a0<strong>Spyder<\/strong><strong>\uff1a<\/strong>Spyder\u662f\u4e00\u6b3e\u4e3a\u4e86\u6570\u636e\u79d1\u5b66\u5de5\u4f5c\u6d41\u505a\u4e86\u4f18\u5316\u7684\u5f00\u6e90Python\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0c \u62e5\u6709\u5927\u90e8\u5206\u96c6\u6210\u5f00\u53d1\u73af\u5883\u8be5\u5177\u5907\u7684\u529f\u80fd\uff0c\u5982\u5f3a\u5927\u8bed\u6cd5\u9ad8\u4eae\u529f\u80fd\u7684\u4ee3\u7801\u7f16\u8f91\u5668\u3001Python\u4ee3\u7801\u8865\u5168\u4ee5\u53ca\u96c6\u6210\u6587\u4ef6\u6d4f\u89c8\u5668\uff0c\u5176\u8fd8\u5177\u6709\u5176\u4ed6Python\u7f16\u8f91\u73af\u5883\u4e2d\u6240\u4e0d\u5177\u5907\u7684\u53d8\u91cf\u6d4f\u89c8\u5668\u529f\u80fd\uff0c\u5341\u5206\u9002\u5408\u4f7f\u7528Python\u7684\u6570\u636e\u79d1\u5b66\u5bb6\u4eec\u3002<\/p>\n<p>4.<strong>\u00a0Thonny<\/strong><strong>\uff1a<\/strong>Thonny\u662f\u9488\u5bf9\u65b0\u624b\u7684\u4e00\u6b3e\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0c\u9002\u7528\u4e8e\u5168\u90e8\u4e3b\u6d41\u5e73\u53f0\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cThonny\u4f1a\u548c\u81ea\u5e26\u6346\u7ed1\u7684Python\u7248\u672c\u4e00\u8d77\u5b89\u88c5\uff0c\u5341\u5206\u65b9\u4fbf\u65b0\u624b\u4f7f\u7528\u3002<\/p>\n<p><strong>\u5ef6\u4f38\u9605\u8bfb\uff1a<br \/><\/strong><\/p>\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001data\u662f\u4ec0\u4e48<\/strong><\/h2>\n<p>data \u7528\u6765\u4fdd\u5b58\u5b9e\u9645\u53d8\u91cf\u7684\u5730\u5740\u3002<\/p>\n<p>data \u4e2d\u7684\u5185\u5bb9\u4f1a\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u53d8\u5316\uff0c\u56e0\u4e3a golang \u5728\u51fd\u6570\u4f20\u53c2\u548c\u8d4b\u503c\u65f6\u662f \u503c\u4f20\u9012 \u7684\uff0c\u6240\u4ee5\uff1a<\/p>\n<p>1.\u00a0 \u5982\u679c\u5b9e\u9645\u7c7b\u578b\u662f\u4e00\u4e2a\u503c\uff0c\u90a3\u4e48 interface \u4f1a\u4fdd\u5b58\u8fd9\u4e2a\u503c\u7684\u4e00\u4efd\u62f7\u8d1d\u3002interface \u4f1a\u5728\u5806\u4e0a\u4e3a\u8fd9\u4e2a\u503c\u5206\u914d\u4e00\u5757\u5185\u5b58\uff0c\u7136\u540e data \u6307\u5411\u5b83\u3002<\/p>\n<p>2.\u00a0 \u5982\u679c\u5b9e\u9645\u7c7b\u578b\u662f\u4e00\u4e2a\u6307\u9488\uff0c\u90a3\u4e48 interface \u4f1a\u4fdd\u5b58\u8fd9\u4e2a\u6307\u9488\u7684\u4e00\u4efd\u62f7\u8d1d\u3002\u7531\u4e8e data \u7684\u957f\u5ea6\u6070\u597d\u80fd\u4fdd\u5b58\u8fd9\u4e2a\u6307\u9488\u7684\u5185\u5bb9\uff0c\u6240\u4ee5 data \u4e2d\u5b58\u50a8\u7684\u5c31\u662f\u6307\u9488\u7684\u503c\u3002\u5b83\u548c\u5b9e\u9645\u6570\u636e\u6307\u5411\u7684\u662f\u540c\u4e00\u4e2a\u53d8\u91cf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4ee3\u7801\u7f16\u8f91\u5668\u548cPython\u96c6\u6210\u5f00\u53d1\u5de5\u5177\u3002Python\u4ee3\u7801\u7f16\u8f91\u5668\u7684\u8f6f\u4ef6\u6709\uff1a1. Sublime Tex [&hellip;]","protected":false},"author":1,"featured_media":29419,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/29418"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=29418"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/29418\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/29419"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=29418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=29418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=29418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}