{"id":29675,"date":"2023-05-14T23:31:59","date_gmt":"2023-05-14T15:31:59","guid":{"rendered":"https:\/\/docs.pingcode.com\/?p=29675"},"modified":"2023-07-31T01:45:53","modified_gmt":"2023-07-30T17:45:53","slug":"__trashed-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/29675.html","title":{"rendered":"Python\u89e3\u91ca\u5668\uff0c\u7ec8\u7aef\uff0c\u7f16\u8f91\u5668\u533a\u522b\u548c\u8054\u7cfb"},"content":{"rendered":"<blockquote class=\"wp-block-quote\">\n<p>Python\u89e3\u91ca\u5668\uff0c\u7ec8\u7aef\uff0c\u7f16\u8f91\u5668\u662fPython\u7f16\u7a0b\u8bed\u8a00\u4e2d\u4e0d\u53ef\u6216\u7f3a\u7684\u4e09\u4e2a\u90e8\u5206\u3002Python\u89e3\u91ca\u5668\u662fPython\u4ee3\u7801\u7684\u6267\u884c\u8005\uff0c\u7ec8\u7aef\u5141\u8bb8\u7528\u6237\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165Python\u547d\u4ee4\u3002\u7f16\u8f91\u5668\u5219\u662f\u7f16\u5199Python\u4ee3\u7801\u7684\u5de5\u5177\u3002Python\u89e3\u91ca\u5668\u3001\u7ec8\u7aef\u548c\u7f16\u8f91\u5668\u76f8\u4e92\u4f9d\u5b58\uff0c\u6bcf\u4e00\u4e2a\u90fd\u6709\u7740\u5404\u81ea\u7684\u529f\u80fd\u548c\u4f5c\u7528\u3002<\/p>\n<\/blockquote>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" alt=\"Python\u89e3\u91ca\u5668\uff0c\u7ec8\u7aef\uff0c\u7f16\u8f91\u5668\u533a\u522b\u548c\u8054\u7cfb\" class=\"wp-image-29738\" decoding=\"async\" height=\"421\" sizes=\"(max-width: 680px) 100vw, 680px\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2023\/05\/Python\u89e3\u91ca\u5668\uff0c\u7ec8\u7aef\uff0c\u7f16\u8f91\u5668\u533a\u522b\u548c\u8054\u7cfb.jpg?x-oss-process=image\/auto-orient,1\/format,webp\" srcset=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2023\/05\/Python\u89e3\u91ca\u5668\uff0c\u7ec8\u7aef\uff0c\u7f16\u8f91\u5668\u533a\u522b\u548c\u8054\u7cfb.jpg?x-oss-process=image\/auto-orient,1\/format,webp 680w, https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2023\/05\/Python\u89e3\u91ca\u5668\uff0c\u7ec8\u7aef\uff0c\u7f16\u8f91\u5668\u533a\u522b\u548c\u8054\u7cfb-300x186.jpg 300w\" width=\"680\"\/><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\">\u4e00\u3001Python\u89e3\u91ca\u5668<\/h2>\n<p>Python\u89e3\u91ca\u5668\u662f\u6267\u884cPython\u4ee3\u7801\u7684\u7a0b\u5e8f\u3002Python\u89e3\u91ca\u5668\u53ef\u4ee5\u89e3\u91ca\u6267\u884cPython\u811a\u672c\u6587\u4ef6\u548c\u5728\u4ea4\u4e92\u5f0f\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u7684Python\u4ee3\u7801\u3002Python\u89e3\u91ca\u5668\u5c06Python\u4ee3\u7801\u8f6c\u5316\u4e3a\u673a\u5668\u8bed\u8a00\uff0c\u4ece\u800c\u4f7f\u8ba1\u7b97\u673a\u80fd\u591f\u7406\u89e3\u548c\u6267\u884c\u5b83\u4eec\u3002<\/p>\n<p>\u5728Python\u4e2d\uff0c\u6709\u4e24\u79cd\u7c7b\u578b\u7684\u89e3\u91ca\u5668\uff1a\u6807\u51c6\u89e3\u91ca\u5668\u548c\u7b2c\u4e09\u65b9\u89e3\u91ca\u5668\u3002\u6807\u51c6\u89e3\u91ca\u5668\u662fPython\u5b98\u65b9\u63d0\u4f9b\u7684\u89e3\u91ca\u5668\uff0c\u5b83\u53ef\u4ee5\u5728Python\u5b98\u7f51\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002\u800c\u7b2c\u4e09\u65b9\u89e3\u91ca\u5668\u662f\u7531\u5176\u4ed6\u7ec4\u7ec7\u6216\u4e2a\u4eba\u5f00\u53d1\u7684\u89e3\u91ca\u5668\uff0c\u53ef\u4ee5\u5728\u4e92\u8054\u7f51\u4e0a\u4e0b\u8f7d\u3002\u6807\u51c6\u89e3\u91ca\u5668\u5206\u4e3a\u4e24\u79cd\uff0c\u5206\u522b\u662f\u547d\u4ee4\u884c\u89e3\u91ca\u5668\u548c\u56fe\u5f62\u754c\u9762\u89e3\u91ca\u5668\u3002<\/p>\n<p>\u547d\u4ee4\u884c\u89e3\u91ca\u5668\u4e5f\u79f0\u4e3aPython\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u6216REPL\uff08Read Evaluate Print Loop\uff09\u89e3\u91ca\u5668\u3002\u5728\u547d\u4ee4\u884c\u89e3\u91ca\u5668\u4e2d\uff0c\u7528\u6237\u53ef\u4ee5\u8fd0\u884cPython\u4ee3\u7801\uff0c\u6807\u51c6\u89e3\u91ca\u5668\u4e2d\u9ed8\u8ba4\u4f7f\u7528\u7684\u662f\u547d\u4ee4\u884c\u89e3\u91ca\u5668\u3002<\/p>\n<p>\u56fe\u5f62\u754c\u9762\u89e3\u91ca\u5668\u5305\u62ecIDLE\uff0cPyCharm\u7b49IDE\uff08\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff09\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u7ec8\u7aef<\/h2>\n<p>\u7ec8\u7aef\u662f\u4e00\u4e2a\u7528\u6237\u63a5\u53e3\u7a0b\u5e8f\uff0c\u5141\u8bb8\u7528\u6237\u901a\u8fc7\u952e\u76d8\u8f93\u5165\u6307\u4ee4\uff0c\u7136\u540e\u53d1\u51fa\u7ed9\u8ba1\u7b97\u673a\u3002\u5728Linux, Unix\u548cMac OS X\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u7ec8\u7aef\u53ef\u901a\u8fc7\u5728Finder\u4e2d\u6253\u5f00\u201c\u5de5\u5177\u201d\u6587\u4ef6\u5939\u5e76\u9009\u62e9\u201c\u7ec8\u7aef\u201d\u6765\u6253\u5f00\u3002<\/p>\n<p>\u7ec8\u7aef\u5141\u8bb8\u7528\u6237\u901a\u8fc7\u547d\u4ee4\u884c\u8f93\u5165\u8fdb\u884cPython\u64cd\u4f5c\u3002\u7528\u6237\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u6253\u5f00Python\u89e3\u91ca\u5668\uff0c\u8fd0\u884cPython\u811a\u672c\u5e76\u5728\u4ea4\u4e92\u6a21\u5f0f\u4e0b\u8f93\u5165Python\u4ee3\u7801\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Python\u89e3\u91ca\u5668\u8fdb\u884c\u7b80\u5355\u7684\u6d4b\u8bd5\u548c\u8c03\u8bd5\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u7f16\u8f91\u5668<\/h2>\n<p>\u7f16\u8f91\u5668\u662f\u4e00\u4e2a\u8f6f\u4ef6\u7a0b\u5e8f\uff0c\u7528\u4e8e\u7f16\u5199\u548c\u7f16\u8f91\u8ba1\u7b97\u673a\u7a0b\u5e8f\u3002\u7f16\u8f91\u5668\u5141\u8bb8\u7a0b\u5e8f\u5458\u7f16\u5199Python\u6e90\u4ee3\u7801\uff0c\u5e76\u5b58\u50a8\u4e3aPython\u6587\u4ef6\u3002\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0cNotepad++\u662f\u4e00\u4e2a\u5e38\u7528\u7684\u7f16\u8f91\u5668\u3002\u5728Mac OS X\u4e0a\uff0cSublime Text\u662f\u4e00\u4e2a\u6d41\u884c\u7684\u7f16\u8f91\u5668\u3002<\/p>\n<p>\u7f16\u8f91\u5668\u53ef\u4ee5\u5e2e\u52a9\u7a0b\u5e8f\u5458\u7f16\u5199Python\u4ee3\u7801\uff0c\u7f16\u8f91\u5668\u901a\u5e38\u6709\u81ea\u52a8\u7f29\u8fdb\u529f\u80fd\u548c\u4ee3\u7801\u9ad8\u4eae\u663e\u793a\u3002\u4ee3\u7801\u9ad8\u4eae\u663e\u793a\u529f\u80fd\u53ef\u4ee5\u8ba9\u7a0b\u5e8f\u5458\u66f4\u5bb9\u6613\u5730\u627e\u5230\u9519\u8bef\u5e76\u8bc6\u522b\u4ee3\u7801\u7ed3\u6784\u3002\u5176\u4ed6\u529f\u80fd\u5305\u62ec\u4ee3\u7801\u6298\u53e0\u3001\u4ee3\u7801\u7247\u6bb5\u548c\u4ee3\u7801\u8865\u5168\u7b49\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u56db\u3001\u8054\u7cfb\u548c\u533a\u522b<\/h2>\n<p>Python\u89e3\u91ca\u5668\uff0c\u7ec8\u7aef\u548c\u7f16\u8f91\u5668\u5728Python\u7f16\u7a0b\u4e2d\u90fd\u6709\u7740\u91cd\u8981\u7684\u4f5c\u7528\u3002<\/p>\n<p><strong>Python\u89e3\u91ca\u5668\u548c\u7ec8\u7aef\u8054\u7cfb\u7d27\u5bc6\uff0c\u53ef\u4ee5\u8ba4\u4e3a\u662f\u4e92\u76f8\u4f9d\u5b58\u7684\u3002<\/strong>Python\u89e3\u91ca\u5668\u9700\u8981\u7ec8\u7aef\u6765\u4e0e\u7528\u6237\u8fdb\u884c\u4ea4\u4e92\u3002\u5728\u7ec8\u7aef\u4e2d\uff0c\u7528\u6237\u53ef\u4ee5\u4f7f\u7528Python\u89e3\u91ca\u5668\u8fd0\u884cPython\u7a0b\u5e8f\u3002Python\u89e3\u91ca\u5668\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e0a\u76f4\u63a5\u8fd0\u884cPython\u811a\u672c\u6587\u4ef6\uff0c\u4e5f\u53ef\u4ee5\u5728\u4ea4\u4e92\u6a21\u5f0f\u4e0b\u8f93\u5165Python\u4ee3\u7801\u4ee5\u8fdb\u884c\u6d4b\u8bd5\u548c\u8c03\u8bd5\u3002<\/p>\n<p>\u7f16\u8f91\u5668\u4e0ePython\u89e3\u91ca\u5668\u548c\u7ec8\u7aef\u7684\u8054\u7cfb\u7565\u6709\u4e0d\u540c\u3002<strong>\u867d\u7136\u7f16\u8f91\u5668\u5e76\u975e\u76f4\u63a5\u4e0ePython\u89e3\u91ca\u5668\u4ea4\u4e92\uff0c\u4f46\u662fPython\u89e3\u91ca\u5668\u9700\u8981\u7f16\u8f91\u5668\u5c06\u5b58\u50a8\u5728Python\u6587\u4ef6\u4e2d\u7684\u6e90\u4ee3\u7801\u5bfc\u5165\uff0c\u89e3\u6790\u5e76\u6267\u884c\u3002<\/strong>\u7f16\u8f91\u5668\u548cPython\u89e3\u91ca\u5668\u7684\u8054\u7cfb\u7c7b\u4f3c\u4e8e\u751f\u4ea7\u6d41\u6c34\u7ebf\u4e2d\u7684\u8fc7\u7a0b\uff0c\u7f16\u8f91\u5668\u7c7b\u4f3c\u4e8e\u751f\u4ea7\u8f66\u95f4\u7684\u4f5c\u4e1a\u5de5\uff0cPython\u89e3\u91ca\u5668\u7c7b\u4f3c\u4e8e\u68c0\u9a8c\u5458\u548c\u8d28\u91cf\u63a7\u5236\u5458\u3002<\/p>\n<p><strong>Python\u89e3\u91ca\u5668\u3001\u7ec8\u7aef\u548c\u7f16\u8f91\u5668\u7684\u533a\u522b\u5728\u4e8e\u5b83\u4eec\u5404\u81ea\u7684\u529f\u80fd\u548c\u76ee\u7684<\/strong>\u3002Python\u89e3\u91ca\u5668\u7528\u4e8e\u7f16\u8bd1Python\u4ee3\u7801\u5e76\u5c06\u5176\u8f6c\u5316\u4e3a\u673a\u5668\u8bed\u8a00\u6267\u884c\u3002\u7ec8\u7aef\u7528\u4e8e\u4e0ePython\u89e3\u91ca\u5668\u8fdb\u884c\u4ea4\u4e92\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u5176\u4e2d\u8f93\u5165Python\u4ee3\u7801\u4ee5\u53ca\u6267\u884cPython\u7a0b\u5e8f\u3002\u7f16\u8f91\u5668\u7528\u4e8e\u7f16\u5199\u548c\u7f16\u8f91Python\u6e90\u4ee3\u7801\uff0c\u5e76\u5c06\u5176\u5b58\u50a8\u4e3aPython\u6587\u4ef6\u3002\u7ed3\u5408\u4f7f\u7528\u8fd9\u4e09\u79cd\u5de5\u5177\uff0c\u7a0b\u5e8f\u5458\u53ef\u4ee5\u66f4\u9ad8\u6548\u5730\u7f16\u5199Python\u7a0b\u5e8f\u3002<\/p>\n<p><strong><em>\u5ef6\u4f38\u9605\u8bfb1\uff1aPython\u89e3\u91ca\u5668\u6709\u54ea\u4e9b<\/em><\/strong><\/p>\n<p>Python\u89e3\u91ca\u5668\u6709\u5f88\u591a\uff0c\u6bcf\u4e2a\u89e3\u91ca\u5668\u90fd\u6709\u5176\u81ea\u8eab\u7684\u7279\u70b9\u548c\u7528\u9014\u3002\u4ee5\u4e0b\u662f\u6bd4\u8f83\u5e38\u89c1\u7684Python\u89e3\u91ca\u5668\uff1a<\/p>\n<p><strong>\u4e00\u3001CPython<\/strong><\/p>\n<p>\u662f\u9ed8\u8ba4\u7684Python\u89e3\u91ca\u5668\uff0c\u7531C\u8bed\u8a00\u5b9e\u73b0\uff0c\u5b83\u662f\u6807\u51c6Python\u8bed\u8a00\u7684\u53c2\u8003\u5b9e\u73b0\u3002CPython\u662f\u4e00\u4e2a\u9ad8\u5ea6\u4f18\u5316\u7684\u89e3\u91ca\u5668\uff0c\u4f46\u5b83\u53ea\u80fd\u4f7f\u7528\u4e00\u4e2aCPU\u6838\u5fc3\u3002<\/p>\n<p><strong>\u4e8c\u3001Jython<\/strong><\/p>\n<p>\u662fPython\u8bed\u8a00\u5728JVM \u4e0a\u7684\u5b9e\u73b0\uff0c\u5b83\u53ef\u4ee5\u76f4\u63a5\u8bbf\u95eeJava \u7684\u7c7b\u5e93\u548c\u8d44\u6e90\u3002\u56e0\u6b64\uff0c\u5b83\u53ef\u4ee5\u5728Java\u5e73\u53f0\u4e0a\u4f7f\u7528Python\u8bed\u8a00\u7f16\u5199\u7684\u7a0b\u5e8f\u3002Jython \u652f\u6301Python2\u548c3\u8bed\u8a00\u89c4\u8303\u3002<\/p>\n<p><strong>\u4e09\u3001IronPython<\/strong><\/p>\n<p>\u662fPython\u8bed\u8a00\u5728.NET \u6846\u67b6\u4e0a\u7684\u5b9e\u73b0\uff0c\u5b83\u5141\u8bb8Python\u4e0eC#\u6216VBNET\u8bed\u8a00\u76f8\u4e92\u4ea4\u4e92\u3002\u5b83\u652f\u6301Python2\u548c3\u8bed\u8a00\u89c4\u8303\u3002<\/p>\n<p><strong>\u56db\u3001PyPy<\/strong><\/p>\n<p>\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u3001\u53ef\u6269\u5c55\u7684Python \u89e3\u91ca\u5668\uff0c\u4f7f\u7528JIT (\u5373\u65f6\u7f16\u8bd1)\u6280\u672f\uff0c\u53ef\u4ee5\u52a0\u901fPython \u7a0b\u5e8f\u7684\u8fd0\u884c\u901f\u5ea6\u3002PyPy \u7684\u901f\u5ea6\u901a\u5e38\u6bd4CPython \u5feb\u6570\u500d\u3002<\/p>\n<p><strong>\u4e94\u3001MicroPython<\/strong><\/p>\n<p>\u662f\u4e00\u79cd\u8f7b\u91cf\u7ea7\u7684Python \u89e3\u91ca\u5668\uff0c\u53ef\u4ee5\u5728\u5fae\u63a7\u5236\u5668\u4e0a\u8fd0\u884c\uff0c\u5b83\u652f\u6301Python3\u8bed\u8a00\u89c4\u8303\u3002\u5b83\u63d0\u4f9b\u4e86Python \u6807\u51c6\u5e93\u7684\u5b50\u96c6\uff0c\u9002\u7528\u4e8e\u5d4c\u5165\u5f0f\u7cfb\u7edf\u548c\u7269\u8054\u7f51\u8bbe\u5907\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u89e3\u91ca\u5668\uff0c\u7ec8\u7aef\uff0c\u7f16\u8f91\u5668\u662fPython\u7f16\u7a0b\u8bed\u8a00\u4e2d\u4e0d\u53ef\u6216\u7f3a\u7684\u4e09\u4e2a\u90e8\u5206\u3002Python\u89e3\u91ca\u5668\u662fPython\u4ee3 [&hellip;]","protected":false},"author":1,"featured_media":29738,"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\/29675"}],"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=29675"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/29675\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/29738"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=29675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=29675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=29675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}