{"id":1078562,"date":"2025-01-08T12:12:44","date_gmt":"2025-01-08T04:12:44","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1078562.html"},"modified":"2025-01-08T12:12:47","modified_gmt":"2025-01-08T04:12:47","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e7%bc%96%e5%86%99%e4%b8%80%e4%b8%aagui-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1078562.html","title":{"rendered":"\u5982\u4f55\u7528python\u7f16\u5199\u4e00\u4e2agui"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24182044\/328e1d7c-b63b-413d-8a82-25a4748136e1.webp\" alt=\"\u5982\u4f55\u7528python\u7f16\u5199\u4e00\u4e2agui\" \/><\/p>\n<p><p> \u5728 Python \u4e2d\u7f16\u5199\u4e00\u4e2a GUI\uff08\u56fe\u5f62\u7528\u6237\u754c\u9762\uff09\u5e94\u7528\u7a0b\u5e8f\u7684\u5e38\u89c1\u65b9\u6cd5\u662f\u4f7f\u7528 Tkinter\u3001PyQt \u6216 Kivy \u7b49\u5e93\u3002<strong>\u4f7f\u7528 Tkinter\u3001PyQt \u548c Kivy \u7b49\u5e93\u521b\u5efa GUI \u5e94\u7528\u7a0b\u5e8f\u3001\u9009\u62e9\u5408\u9002\u7684\u5e93\u548c\u5de5\u5177\u3001\u8bbe\u8ba1\u7528\u6237\u53cb\u597d\u7684\u754c\u9762\u3001\u7f16\u5199\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u3001\u6d4b\u8bd5\u548c\u8c03\u8bd5<\/strong>\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u8ba8\u8bba\u8fd9\u4e9b\u65b9\u9762\uff0c\u4ee5\u4fbf\u4f60\u53ef\u4ee5\u987a\u5229\u5f00\u59cb\u7f16\u5199\u81ea\u5df1\u7684 GUI \u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u9009\u62e9\u5408\u9002\u7684\u5e93\u548c\u5de5\u5177<\/h3>\n<\/p>\n<p><h4>1\u3001Tkinter<\/h4>\n<\/p>\n<p><p>Tkinter \u662f Python \u7684\u6807\u51c6 GUI \u5e93\uff0c\u4f7f\u7528 Tkinter \u521b\u5efa GUI \u5e94\u7528\u7a0b\u5e8f\u975e\u5e38\u7b80\u5355\u3002\u5b83\u662f\u5185\u7f6e\u7684\uff0c\u65e0\u9700\u989d\u5916\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>def say_hello():<\/p>\n<p>    label.config(text=&quot;Hello, Tkinter!&quot;)<\/p>\n<p>root = tk.Tk()<\/p>\n<p>root.title(&quot;My Tkinter App&quot;)<\/p>\n<p>label = tk.Label(root, text=&quot;Click the button&quot;)<\/p>\n<p>label.pack()<\/p>\n<p>button = tk.Button(root, text=&quot;Click Me&quot;, command=say_hello)<\/p>\n<p>button.pack()<\/p>\n<p>root.m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>nloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001PyQt<\/h4>\n<\/p>\n<p><p>PyQt \u662f\u53e6\u4e00\u79cd\u5f3a\u5927\u7684\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u66f4\u591a\u7684\u529f\u80fd\u548c\u66f4\u590d\u6742\u7684\u63a7\u4ef6\uff0c\u4f46\u9700\u8981\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pyqt5<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><pre><code class=\"language-python\">from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QPushButton, QVBoxLayout<\/p>\n<p>def say_hello():<\/p>\n<p>    label.setText(&quot;Hello, PyQt!&quot;)<\/p>\n<p>app = QApplication([])<\/p>\n<p>window = QWidget()<\/p>\n<p>window.setWindowTitle(&quot;My PyQt App&quot;)<\/p>\n<p>layout = QVBoxLayout()<\/p>\n<p>label = QLabel(&quot;Click the button&quot;)<\/p>\n<p>layout.addWidget(label)<\/p>\n<p>button = QPushButton(&quot;Click Me&quot;)<\/p>\n<p>button.clicked.connect(say_hello)<\/p>\n<p>layout.addWidget(button)<\/p>\n<p>window.setLayout(layout)<\/p>\n<p>window.show()<\/p>\n<p>app.exec_()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001Kivy<\/h4>\n<\/p>\n<p><p>Kivy \u662f\u4e00\u4e2a\u9002\u7528\u4e8e\u591a\u70b9\u89e6\u6478\u5e94\u7528\u7a0b\u5e8f\u7684\u5e93\uff0c\u9002\u5408\u521b\u5efa\u73b0\u4ee3\u548c\u590d\u6742\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install kivy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><pre><code class=\"language-python\">from kivy.app import App<\/p>\n<p>from kivy.uix.button import Button<\/p>\n<p>from kivy.uix.label import Label<\/p>\n<p>from kivy.uix.boxlayout import BoxLayout<\/p>\n<p>class MyApp(App):<\/p>\n<p>    def build(self):<\/p>\n<p>        layout = BoxLayout(orientation=&#39;vertical&#39;)<\/p>\n<p>        self.label = Label(text=&quot;Click the button&quot;)<\/p>\n<p>        layout.add_widget(self.label)<\/p>\n<p>        button = Button(text=&quot;Click Me&quot;)<\/p>\n<p>        button.bind(on_press=self.say_hello)<\/p>\n<p>        layout.add_widget(button)<\/p>\n<p>        return layout<\/p>\n<p>    def say_hello(self, instance):<\/p>\n<p>        self.label.text = &quot;Hello, Kivy!&quot;<\/p>\n<p>MyApp().run()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u8bbe\u8ba1\u7528\u6237\u53cb\u597d\u7684\u754c\u9762<\/h3>\n<\/p>\n<p><h4>1\u3001\u5e03\u5c40\u8bbe\u8ba1<\/h4>\n<\/p>\n<p><p>\u5e03\u5c40\u8bbe\u8ba1\u662f\u521b\u5efa\u7528\u6237\u53cb\u597d\u754c\u9762\u7684\u5173\u952e\u3002\u5728 Tkinter \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>pack<\/code>\u3001<code>grid<\/code> \u548c <code>place<\/code> \u7b49\u51e0\u79cd\u5e03\u5c40\u7ba1\u7406\u5668\u6765\u7ec4\u7ec7\u63a7\u4ef6\u3002\u5728 PyQt \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>QVBoxLayout<\/code>\u3001<code>QHBoxLayout<\/code> \u548c <code>QGridLayout<\/code> \u7b49\u5e03\u5c40\u7ba1\u7406\u5668\u3002\u5728 Kivy \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>BoxLayout<\/code>\u3001<code>GridLayout<\/code> \u548c <code>FloatLayout<\/code> \u7b49\u5e03\u5c40\u7ba1\u7406\u5668\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u63a7\u4ef6\u9009\u62e9<\/h4>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684\u63a7\u4ef6\uff08\u5982\u6309\u94ae\u3001\u6807\u7b7e\u3001\u6587\u672c\u6846\u3001\u4e0b\u62c9\u83dc\u5355\u7b49\uff09\u6765\u6ee1\u8db3\u7528\u6237\u7684\u9700\u6c42\u3002\u4f8b\u5982\uff0c\u5728 Tkinter \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>Button<\/code>\u3001<code>Label<\/code>\u3001<code>Entry<\/code> \u7b49\u63a7\u4ef6\u3002\u5728 PyQt \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>QPushButton<\/code>\u3001<code>QLabel<\/code>\u3001<code>QLineEdit<\/code> \u7b49\u63a7\u4ef6\u3002\u5728 Kivy \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>Button<\/code>\u3001<code>Label<\/code>\u3001<code>TextInput<\/code> \u7b49\u63a7\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>3\u3001\u98ce\u683c\u548c\u4e3b\u9898<\/h4>\n<\/p>\n<p><p>\u901a\u8fc7\u8bbe\u7f6e\u63a7\u4ef6\u7684\u5c5e\u6027\uff08\u5982\u989c\u8272\u3001\u5b57\u4f53\u3001\u5927\u5c0f\u7b49\uff09\uff0c\u53ef\u4ee5\u7f8e\u5316\u754c\u9762\u3002\u5728 Tkinter \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>config<\/code> \u65b9\u6cd5\u6765\u8bbe\u7f6e\u63a7\u4ef6\u7684\u5c5e\u6027\u3002\u5728 PyQt \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>setStyleSheet<\/code> \u65b9\u6cd5\u6765\u8bbe\u7f6e\u63a7\u4ef6\u7684\u6837\u5f0f\u3002\u5728 Kivy \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 KV \u8bed\u8a00\u6216\u76f4\u63a5\u5728 Python \u4ee3\u7801\u4e2d\u8bbe\u7f6e\u63a7\u4ef6\u7684\u5c5e\u6027\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u7f16\u5199\u4e8b\u4ef6\u5904\u7406\u51fd\u6570<\/h3>\n<\/p>\n<p><h4>1\u3001\u7ed1\u5b9a\u4e8b\u4ef6<\/h4>\n<\/p>\n<p><p>\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u7528\u4e8e\u54cd\u5e94\u7528\u6237\u7684\u64cd\u4f5c\uff08\u5982\u70b9\u51fb\u6309\u94ae\u3001\u8f93\u5165\u6587\u672c\u7b49\uff09\u3002\u5728 Tkinter \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>command<\/code> \u53c2\u6570\u7ed1\u5b9a\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u3002\u5728 PyQt \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>clicked.connect<\/code> \u65b9\u6cd5\u7ed1\u5b9a\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u3002\u5728 Kivy \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>bind<\/code> \u65b9\u6cd5\u7ed1\u5b9a\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u5b9e\u73b0\u529f\u80fd<\/h4>\n<\/p>\n<p><p>\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u4e2d\u5e94\u8be5\u5305\u542b\u5b9e\u73b0\u5177\u4f53\u529f\u80fd\u7684\u4ee3\u7801\u3002\u4f8b\u5982\uff0c\u5728\u70b9\u51fb\u6309\u94ae\u65f6\uff0c\u53ef\u4ee5\u663e\u793a\u4e00\u6761\u6d88\u606f\u3001\u66f4\u65b0\u754c\u9762\u3001\u6267\u884c\u67d0\u4e2a\u8ba1\u7b97\u7b49\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u6d4b\u8bd5\u548c\u8c03\u8bd5<\/h3>\n<\/p>\n<p><h4>1\u3001\u5355\u5143\u6d4b\u8bd5<\/h4>\n<\/p>\n<p><p>\u7f16\u5199\u5355\u5143\u6d4b\u8bd5\u6765\u9a8c\u8bc1\u5404\u4e2a\u529f\u80fd\u662f\u5426\u6b63\u5e38\u5de5\u4f5c\u3002\u5728 Python \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>unittest<\/code> \u5e93\u6765\u7f16\u5199\u548c\u8fd0\u884c\u5355\u5143\u6d4b\u8bd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import unittest<\/p>\n<p>class TestMyApp(unittest.TestCase):<\/p>\n<p>    def test_say_hello(self):<\/p>\n<p>        self.assertEqual(say_hello(), &quot;Hello, World!&quot;)<\/p>\n<p>if __name__ == &quot;__main__&quot;:<\/p>\n<p>    unittest.main()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u624b\u52a8\u6d4b\u8bd5<\/h4>\n<\/p>\n<p><p>\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u5e76\u624b\u52a8\u6d4b\u8bd5\u5404\u4e2a\u529f\u80fd\uff0c\u786e\u4fdd\u6240\u6709\u63a7\u4ef6\u548c\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u90fd\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<\/p>\n<p><h4>3\u3001\u8c03\u8bd5<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u8c03\u8bd5\u5de5\u5177\uff08\u5982 Python \u7684\u5185\u7f6e\u8c03\u8bd5\u5668 <code>pdb<\/code>\uff09\u6765\u67e5\u627e\u548c\u4fee\u590d\u4ee3\u7801\u4e2d\u7684\u9519\u8bef\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pdb<\/p>\n<p>def problematic_function():<\/p>\n<p>    pdb.set_trace()<\/p>\n<p>    # \u4ee3\u7801\u4e2d\u65ad\u70b9<\/p>\n<p>    result = 1 \/ 0  # \u6545\u610f\u5f15\u53d1\u9519\u8bef<\/p>\n<p>    return result<\/p>\n<p>problematic_function()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u4f18\u5316\u548c\u53d1\u5e03<\/h3>\n<\/p>\n<p><h4>1\u3001\u6027\u80fd\u4f18\u5316<\/h4>\n<\/p>\n<p><p>\u4f18\u5316\u4ee3\u7801\u4ee5\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u7684\u6027\u80fd\u3002\u4f8b\u5982\uff0c\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u8ba1\u7b97\u3001\u4f7f\u7528\u9ad8\u6548\u7684\u6570\u636e\u7ed3\u6784\u3001\u907f\u514d\u963b\u585e\u64cd\u4f5c\u7b49\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u6253\u5305\u548c\u53d1\u5e03<\/h4>\n<\/p>\n<p><p>\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u5e76\u53d1\u5e03\u5230\u7528\u6237\u53ef\u4ee5\u4e0b\u8f7d\u548c\u5b89\u88c5\u7684\u5730\u65b9\u3002\u5728 Python \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>PyInstaller<\/code> \u6216 <code>cx_Freeze<\/code> \u7b49\u5de5\u5177\u6765\u6253\u5305\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pyinstaller<\/p>\n<p>pyinstaller --onefile my_app.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u3001\u7528\u6237\u53cb\u597d\u7684 Python GUI \u5e94\u7528\u7a0b\u5e8f\u3002\u65e0\u8bba\u662f\u4f7f\u7528 Tkinter\u3001PyQt \u8fd8\u662f Kivy\uff0c\u5173\u952e\u662f\u9009\u62e9\u5408\u9002\u7684\u5e93\u548c\u5de5\u5177\u3001\u8bbe\u8ba1\u7528\u6237\u53cb\u597d\u7684\u754c\u9762\u3001\u7f16\u5199\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u3001\u6d4b\u8bd5\u548c\u8c03\u8bd5\uff0c\u5e76\u6700\u7ec8\u4f18\u5316\u548c\u53d1\u5e03\u5e94\u7528\u7a0b\u5e8f\u3002\u5e0c\u671b\u8fd9\u4e9b\u5efa\u8bae\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff0c\u795d\u4f60\u5728\u7f16\u5199 Python GUI \u5e94\u7528\u7a0b\u5e8f\u7684\u8fc7\u7a0b\u4e2d\u53d6\u5f97\u6210\u529f\uff01<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684Python\u5e93\u6765\u521b\u5efaGUI\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u6709\u51e0\u4e2a\u6d41\u884c\u7684\u5e93\u53ef\u4ee5\u7528\u6765\u521b\u5efa\u56fe\u5f62\u7528\u6237\u754c\u9762\uff08GUI\uff09\uff0c\u4f8b\u5982Tkinter\u3001PyQt\u548cKivy\u3002Tkinter\u662fPython\u7684\u6807\u51c6\u5e93\uff0c\u7b80\u5355\u6613\u5b66\uff0c\u975e\u5e38\u9002\u5408\u521d\u5b66\u8005\u3002PyQt\u5219\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u548c\u7075\u6d3b\u6027\uff0c\u9002\u5408\u9700\u8981\u590d\u6742\u754c\u9762\u7684\u5e94\u7528\u7a0b\u5e8f\u3002Kivy\u5219\u4e13\u6ce8\u4e8e\u591a\u70b9\u89e6\u63a7\u548c\u79fb\u52a8\u5e94\u7528\u5f00\u53d1\u3002\u9009\u62e9\u54ea\u4e2a\u5e93\u53d6\u51b3\u4e8e\u60a8\u7684\u9879\u76ee\u9700\u6c42\u548c\u4e2a\u4eba\u504f\u597d\u3002<\/p>\n<p><strong>\u521b\u5efa\u7b80\u5355\u7684GUI\u5e94\u7528\u7a0b\u5e8f\u9700\u8981\u54ea\u4e9b\u6b65\u9aa4\uff1f<\/strong><br \/>\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684GUI\u5e94\u7528\u7a0b\u5e8f\u901a\u5e38\u9700\u8981\u51e0\u4e2a\u6b65\u9aa4\uff1a\u9996\u5148\uff0c\u5b89\u88c5\u6240\u9700\u7684\u5e93\uff08\u5982Tkinter\u901a\u5e38\u4e0d\u9700\u8981\u5355\u72ec\u5b89\u88c5\uff0c\u56e0\u4e3a\u5b83\u662fPython\u7684\u6807\u51c6\u5e93\uff09\u3002\u63a5\u4e0b\u6765\uff0c\u5bfc\u5165\u5e93\u5e76\u521b\u5efa\u4e3b\u7a97\u53e3\u3002\u7136\u540e\uff0c\u60a8\u53ef\u4ee5\u6dfb\u52a0\u5404\u79cd\u63a7\u4ef6\uff0c\u5982\u6309\u94ae\u3001\u6807\u7b7e\u548c\u6587\u672c\u6846\u3002\u6700\u540e\uff0c\u4f7f\u7528\u4e3b\u4e8b\u4ef6\u5faa\u73af\u6765\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\uff0c\u4f7f\u5176\u80fd\u591f\u54cd\u5e94\u7528\u6237\u7684\u64cd\u4f5c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python GUI\u4e2d\u5904\u7406\u7528\u6237\u8f93\u5165\u548c\u4e8b\u4ef6\uff1f<\/strong><br \/>\u5904\u7406\u7528\u6237\u8f93\u5165\u548c\u4e8b\u4ef6\u901a\u5e38\u6d89\u53ca\u5230\u4e3a\u63a7\u4ef6\u8bbe\u7f6e\u4e8b\u4ef6\u76d1\u542c\u5668\u6216\u56de\u8c03\u51fd\u6570\u3002\u4f8b\u5982\uff0c\u5728Tkinter\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>button.bind()<\/code>\u65b9\u6cd5\u5c06\u6309\u94ae\u7684\u70b9\u51fb\u4e8b\u4ef6\u4e0e\u7279\u5b9a\u51fd\u6570\u5173\u8054\u3002\u8fd9\u6837\uff0c\u5f53\u7528\u6237\u70b9\u51fb\u6309\u94ae\u65f6\uff0c\u5b9a\u4e49\u7684\u51fd\u6570\u5c06\u88ab\u8c03\u7528\uff0c\u60a8\u53ef\u4ee5\u5728\u5176\u4e2d\u5904\u7406\u7528\u6237\u8f93\u5165\u6216\u6267\u884c\u5176\u4ed6\u64cd\u4f5c\u3002\u786e\u4fdd\u4ed4\u7ec6\u8bbe\u8ba1\u4e8b\u4ef6\u5904\u7406\u903b\u8f91\uff0c\u4ee5\u63d0\u5347\u7528\u6237\u4f53\u9a8c\u548c\u5e94\u7528\u7684\u54cd\u5e94\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728 Python \u4e2d\u7f16\u5199\u4e00\u4e2a GUI\uff08\u56fe\u5f62\u7528\u6237\u754c\u9762\uff09\u5e94\u7528\u7a0b\u5e8f\u7684\u5e38\u89c1\u65b9\u6cd5\u662f\u4f7f\u7528 Tkinter\u3001PyQt \u6216 K [&hellip;]","protected":false},"author":3,"featured_media":1078568,"comment_status":"closed","ping_status":"","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\/1078562"}],"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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1078562"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1078562\/revisions"}],"predecessor-version":[{"id":1078570,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1078562\/revisions\/1078570"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1078568"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1078562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1078562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1078562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}