{"id":10227,"date":"2023-11-27T15:44:32","date_gmt":"2023-11-27T07:44:32","guid":{"rendered":"https:\/\/www.zhidianwl.net\/zhidianwl\/?p=10227"},"modified":"2023-11-27T15:44:32","modified_gmt":"2023-11-27T07:44:32","slug":"phython%e5%bc%80%e5%8f%91%e6%a1%8c%e9%9d%a2%e5%ba%94%e7%94%a8%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0%e7%9a%84","status":"publish","type":"post","link":"https:\/\/www.zhidianwl.net\/zhidianwl\/2023\/11\/27\/phython%e5%bc%80%e5%8f%91%e6%a1%8c%e9%9d%a2%e5%ba%94%e7%94%a8%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0%e7%9a%84\/","title":{"rendered":"phython\u5f00\u53d1\u684c\u9762\u5e94\u7528\u600e\u4e48\u5b9e\u73b0\u7684?"},"content":{"rendered":"

Python\u662f\u4e00\u79cd\u9ad8\u7ea7\u7f16\u7a0b\u8bed\u8a00\uff0c\u5e7f\u6cdb\u5e94\u7528\u4e8e\u6570\u636e\u79d1\u5b66\u3001\u4eba\u5de5\u667a\u80fd\u3001\u7f51\u7edc\u7f16\u7a0b\u7b49\u9886\u57df\u3002\u867d\u7136Python\u6700\u521d\u662f\u4e00\u79cd\u811a\u672c\u8bed\u8a00\uff0c\u4f46\u662f\u968f\u7740Python\u7684\u53d1\u5c55\uff0c\u5b83\u4e5f\u9010\u6e10\u6210\u4e3a\u4e86\u4e00\u79cd\u5f3a\u5927\u7684\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u8bed\u8a00\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecdPython\u5f00\u53d1\u684c\u9762\u5e94\u7528\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n

\u4e00\u3001Python\u5f00\u53d1\u684c\u9762\u5e94\u7528\u7684\u539f\u7406<\/p>\n

Python\u5f00\u53d1\u684c\u9762\u5e94\u7528\u7684\u539f\u7406\u4e3b\u8981\u662f\u5229\u7528Python\u7684GUI\u5e93\u6765\u5b9e\u73b0\u56fe\u5f62\u754c\u9762\u3002Python\u7684GUI\u5e93\u6709\u5f88\u591a\u79cd\uff0c\u4f8b\u5982Tkinter\u3001PyQt\u3001wxPython\u7b49\u7b49\u3002\u5176\u4e2d\uff0cTkinter\u662fPython\u81ea\u5e26\u7684GUI\u5e93\uff0c\u4f7f\u7528\u6bd4\u8f83\u7b80\u5355\uff0c\u9002\u5408\u521d\u5b66\u8005\u5165linuxrpm\u5305<\/a>\u95e8\u3002PyQt\u662f\u4e00\u79cd\u57fa\u4e8eQt\u6846\u67b6\u7684Python GUI\u5e93\uff0c\u529f\u80fd\u975e\u5e38\u5f3a\u5927\uff0c\u9002\u5408\u5f00\u53d1\u5927\u578b\u9879\u76ee\u3002wxPython\u662f\u57fa\u4e8eC++\u7684wxWidgets\u5e93\u7684Python\u5c01\u88c5\uff0c\u4e5f\u662f\u4e00\u79cd\u975e\u5e38\u6d41\u884c\u7684GUI\u5e93\u3002<\/p>\n

Python\u5f00\u53d1\u684c\u9762\u5e94\u7528\u7684\u53e6\u4e00\u4e2a\u91cd\u8981\u539f\u7406\u662f\u5229\u7528Python\u7684<\/p>\n

<\/figure>\n<\/p>\n

\u6a21\u5757\u5316\u7f16\u7a0b\u7279\u6027\u3002Python\u7684\u6a21\u5757\u5316\u7f16\u7a0b\u5141\u8bb8\u5f00\u53d1\u8005\u5c06\u4ee3\u7801\u5206\u6210\u591a\u4e2a\u6a21\u5757\uff0c\u6bcf\u4e2a\u6a21\u5757\u90fd\u53ef\u4ee5\u72ec\u7acb\u5f00\u53d1\u3001\u6d4b\u8bd5\u548c\u7ef4\u62a4\u3002\u8fd9\u79cd\u6a21\u5757\u5316\u7f16\u7a0b\u7684\u7279\u6027\u4f7f\u5f97Python\u5f00\u53d1\u684c\u9762\u5e94\u7528\u53d8\u5f97\u66f4\u52a0\u7075\u6d3b\u548c\u5bb9\u6613\u7ef4\u62a4\u3002<\/p>\n

\u4e8c\u3001Python\u5f00\u53d1\u684c\u9762\u5e94\u7528\u7684\u8be6\u7ec6\u6b65\u9aa4<\/p>\n

1.\u5b89\u88c5Python<\/p>\n

\u8981\u5f00\u53d1Python\u684c\u9762\u5e94\u7528\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5Python\u3002Python\u7684\u5b98\u65b9\u7f51\u7ad9\u63d0\u4f9b\u4e86Python\u7684\u5b89\u88c5\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u4e0b\u8f7d\u76f8\u5e94\u7684\u5b89\u88c5\u7a0b\u5e8f\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n

2.\u9009\u62e9GUI\u5e93<\/p>\n

\u9009\u62e9\u5408\u9002\u7684GUI\u5e93\u662f\u5f00\u53d1Python\u684c\u9762\u5e94\u7528\u7684\u5173\u952e\u3002\u5982\u679c\u662f\u521d\u5b66\u8005\uff0c\u53ef\u4ee5\u9009\u62e9Python\u81ea\u5e26\u7684Tkinter\u5e93\u8fdb\u884c\u5f00\u53d1\uff0c\u5982\u679c\u9700\u8981\u5f00\u53d1\u5927\u578b\u9879\u76ee\uff0c\u53ef\u4ee5\u9009\u62e9PyQt\u6216wxPython\u7b49\u66f4\u52a0\u5f3a\u5927\u7684GUI\u5e93\u3002<\/p>\n

3.\u7f16\u5199\u4ee3\u7801<\/p>\n

\u7f16\u5199Python\u684c\u9762\u5e94\u7528\u7684\u4ee3\u7801jwt\u6253\u5305exe<\/a>\u9700\u8981\u719f\u6089\u6240\u9009GUI\u5e93\u7684API\u548cPython\u7684\u8bed\u6cd5\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0cPython\u684c\u9762\u5e94\u7528\u7684\u4ee3\u7801\u9700\u8981\u5206\u4e3a\u4e24\u4e2a\u90e8\u5206\uff1a\u754c\u9762\u8bbe\u8ba1\u548c\u903b\u8f91\u5904\u7406\u3002<\/p>\n

\u754c\u9762\u8bbe\u8ba1\u90e8\u5206\u9700\u8981\u4f7f\u7528GUI\u5e93\u63d0\u4f9b\u7684\u63a7\u4ef6\u548c\u5e03\u5c40\u6765\u8bbe\u8ba1\u5e94\u7528\u7a0b\u5e8f\u7684\u754c\u9762\u3002\u903b\u8f91\u5904\u7406\u90e8\u5206\u9700\u8981\u7f16\u5199Python\u4ee3\u7801\u6765\u5b9e\u73b0\u5e94\u7528\u7a0b\u5e8f\u7684\u529f\u80fd\uff0c\u4f8b\u5982\u54cd\u5e94\u6309\u94ae\u70b9\u51fb\u4e8b\u4ef6\u3001\u5904\u7406\u7528\u6237\u8f93\u5165\u7b49\u7b49\u3002<\/p>\n

4.\u6d4b\u8bd5\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\u7f16\u5199\u5b8cPython\u684c\u9762\u5e94\u7528\u7684\u4ee3\u7801\u540e\uff0c\u9700\u8981\u8fdb\u884c\u6d4b\u8bd5\u3002\u53ef\u4ee5\u4f7f\u7528Python\u81ea\u5e26\u7684IDLE\u6216\u8005\u5176\u4ed6\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6765\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u6d4b\u8bd5\u5e94\u7528\u7a0b\u5e8f\u7684\u5404\u9879\u529f\u80fd\u662f\u5426\u6b63\u5e38\u3002<\/p>\n

5.\u6253\u5305\u53d1\u5e03\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\u6700\u540e\uff0c\u9700\u8981\u5c06Python\u684c\u9762\u5e94\u7528\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u5e76\u53d1\u5e03\u5e94\u7528\u7a0b\u5e8f\u3002Python\u63d0\u4f9b\u4e86\u4e00\u4e9b\u6253\u5305\u5de5\u5177\uff0c\u4f8b\u5982PyInstaller\u548ccx_Freeze\u7b49\uff0c\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\u3002\u53d1\u5e03\u5e94\u7528\u7a0b\u5e8f\u9700\u8981\u5c06\u6253\u5305\u540e\u7684\u53ef\u6267\u884c\u6587\u4ef6\u548c\u76f8\u5173\u6587\u4ef6\u4e00\u8d77\u6253\u5305\uff0c\u4ee5\u4fbf\u7528\u6237\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n

\u603b\u4e4b\uff0cPython\u5f00\u53d1\u684c\u9762\u5e94\u7528\u9700\u8981\u638c\u63e1Python\u7684GUI\u5e93\u548c\u6a21\u5757\u5316\u7f16\u7a0b\u7279\u6027\uff0c\u719f\u6089Python\u7684\u8bed\u6cd5\u548c\u5e38\u7528API\uff0c\u4ee5\u53ca\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\u8fdb\u884c\u5f00\u53d1\u548c\u6d4b\u8bd5\u3002\u5f00\u53d1Python\u684c\u9762\u5e94\u7528\u9700\u8981\u6709\u4e00\u5b9a\u7684\u7f16\u7a0b\u7ecf\u9a8c\u548c\u6280\u80fd\uff0c\u4f46\u662fPython\u7684\u6613\u5b66\u6613\u7528\u6027\u4f7f\u5f97\u521d\u5b66\u8005\u4e5f\u53ef\u4ee5\u8f7b\u677e\u4e0a\u624b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Python\u662f\u4e00\u79cd\u9ad8\u7ea7\u7f16\u7a0b\u8bed\u8a00\uff0c\u5e7f\u6cdb\u5e94\u7528\u4e8e\u6570\u636e\u79d1\u5b66\u3001\u4eba\u5de5\u667a\u80fd\u3001\u7f51\u7edc\u7f16\u7a0b\u7b49\u9886\u57df\u3002\u867d\u7136Python\u6700\u521d\u662f\u4e00\u79cd\u811a\u672c\u8bed\u8a00\uff0c\u4f46\u662f\u968f\u7740Python\u7684\u53d1\u5c55\uff0c\u5b83\u4e5f\u9010\u6e10\u6210\u4e3a\u4e86\u4e00\u79cd\u5f3a\u5927\u7684\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u8bed\u8a00\u3002\u5728\u672c\u6587\u4e2d\uff0c<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[1067,16344,38,116,963],"topic":[],"class_list":["post-10227","post","type-post","status-publish","format-standard","hentry","category-zhuomianruanjian","tag-linuxtee","tag-pak","tag-38","tag-116","tag-963"],"_links":{"self":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/10227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/comments?post=10227"}],"version-history":[{"count":1,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/10227\/revisions"}],"predecessor-version":[{"id":10273,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/10227\/revisions\/10273"}],"wp:attachment":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/media?parent=10227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/categories?post=10227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/tags?post=10227"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/topic?post=10227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}