{"id":1010913,"date":"2024-12-27T11:25:28","date_gmt":"2024-12-27T03:25:28","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1010913.html"},"modified":"2024-12-27T11:25:30","modified_gmt":"2024-12-27T03:25:30","slug":"python%e5%a6%82%e4%bd%95%e7%94%a8%e9%bc%a0%e6%a0%87%e7%94%bb%e7%94%bb","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1010913.html","title":{"rendered":"python\u5982\u4f55\u7528\u9f20\u6807\u753b\u753b"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25085247\/855c14e8-9228-48ea-bb8b-b51803e07614.webp\" alt=\"python\u5982\u4f55\u7528\u9f20\u6807\u753b\u753b\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u4f7f\u7528\u9f20\u6807\u753b\u753b\uff0c\u53ef\u4ee5\u901a\u8fc7\u56fe\u5f62\u7528\u6237\u754c\u9762\uff08GUI\uff09\u5e93\uff0c\u5982Tkinter\u3001Pygame\u6216PyQt\u7b49\u6765\u5b9e\u73b0\u3002\u8fd9\u4e9b\u5e93\u63d0\u4f9b\u4e86\u9f20\u6807\u4e8b\u4ef6\u5904\u7406\u548c\u56fe\u5f62\u7ed8\u5236\u529f\u80fd\uff0c\u4f7f\u5f97\u9f20\u6807\u753b\u753b\u6210\u4e3a\u53ef\u80fd\u3002Tkinter\u662fPython\u6807\u51c6\u5e93\u7684\u4e00\u90e8\u5206\uff0c\u6613\u4e8e\u4f7f\u7528\uff0c\u9002\u5408\u521d\u5b66\u8005\uff1bPygame\u66f4\u9002\u5408\u6e38\u620f\u5f00\u53d1\uff0c\u63d0\u4f9b\u4e30\u5bcc\u7684\u56fe\u5f62\u5904\u7406\u529f\u80fd\uff1bPyQt\u529f\u80fd\u5f3a\u5927\uff0c\u9002\u5408\u66f4\u590d\u6742\u7684\u5e94\u7528\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Tkinter\u6765\u5b9e\u73b0\u9f20\u6807\u753b\u753b\u529f\u80fd\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528TKINTER\u5b9e\u73b0\u9f20\u6807\u753b\u753b<\/p>\n<\/p>\n<p><p>Tkinter\u662fPython\u7684\u6807\u51c6GUI\u5de5\u5177\u5305\uff0c\u63d0\u4f9b\u4e86\u7b80\u5355\u6613\u7528\u7684\u754c\u9762\u8bbe\u8ba1\u529f\u80fd\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u6355\u6349\u9f20\u6807\u4e8b\u4ef6\uff0c\u5728\u753b\u5e03\u4e0a\u7ed8\u5236\u56fe\u5f62\u3002<\/p>\n<\/p>\n<ol>\n<li>Tkinter\u57fa\u7840\u8bbe\u7f6e<\/li>\n<\/ol>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5bfc\u5165Tkinter\u6a21\u5757\u5e76\u521b\u5efa\u4e00\u4e2a\u4e3b\u7a97\u53e3\u3002\u7136\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u7a97\u53e3\u4e2d\u6dfb\u52a0\u4e00\u4e2aCanvas\u7ec4\u4ef6\uff0c\u7528\u4e8e\u7ed8\u5236\u56fe\u5f62\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>def m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n():<\/p>\n<p>    root = tk.Tk()<\/p>\n<p>    root.title(&quot;Mouse Drawing with Tkinter&quot;)<\/p>\n<p>    canvas = tk.Canvas(root, width=800, height=600, bg=&#39;white&#39;)<\/p>\n<p>    canvas.pack()<\/p>\n<p>    root.mainloop()<\/p>\n<p>if __name__ == &quot;__main__&quot;:<\/p>\n<p>    main()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u7ed1\u5b9a\u9f20\u6807\u4e8b\u4ef6<\/li>\n<\/ol>\n<p><p>\u4e3a\u4e86\u5b9e\u73b0\u9f20\u6807\u753b\u753b\u529f\u80fd\uff0c\u6211\u4eec\u9700\u8981\u7ed1\u5b9a\u9f20\u6807\u4e8b\u4ef6\uff0c\u4f8b\u5982\u9f20\u6807\u6309\u4e0b\u3001\u79fb\u52a8\u3001\u548c\u677e\u5f00\u7b49\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7<code>bind<\/code>\u65b9\u6cd5\u5c06\u4e8b\u4ef6\u548c\u5904\u7406\u51fd\u6570\u5173\u8054\u8d77\u6765\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def main():<\/p>\n<p>    # ... (\u7701\u7565\u4ee3\u7801)<\/p>\n<p>    def draw(event):<\/p>\n<p>        x, y = event.x, event.y<\/p>\n<p>        canvas.create_oval(x-1, y-1, x+1, y+1, fill=&#39;black&#39;)<\/p>\n<p>    canvas.bind(&#39;&lt;B1-Motion&gt;&#39;, draw)<\/p>\n<p>    # ... (\u7701\u7565\u4ee3\u7801)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c<code>&lt;B1-Motion&gt;<\/code>\u4e8b\u4ef6\u4ee3\u8868\u9f20\u6807\u5de6\u952e\u6309\u4e0b\u5e76\u79fb\u52a8\u3002\u6bcf\u6b21\u89e6\u53d1\u8be5\u4e8b\u4ef6\u65f6\uff0c\u90fd\u4f1a\u8c03\u7528<code>draw<\/code>\u51fd\u6570\uff0c\u5728\u9f20\u6807\u4f4d\u7f6e\u753b\u4e00\u4e2a\u5c0f\u5706\u70b9\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li>\u5b8c\u6574\u5b9e\u73b0<\/li>\n<\/ol>\n<p><p>\u7ed3\u5408\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9e\u73b0\u4e00\u4e2a\u7b80\u5355\u7684\u9f20\u6807\u753b\u753b\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tkinter as tk<\/p>\n<p>def main():<\/p>\n<p>    root = tk.Tk()<\/p>\n<p>    root.title(&quot;Mouse Drawing with Tkinter&quot;)<\/p>\n<p>    canvas = tk.Canvas(root, width=800, height=600, bg=&#39;white&#39;)<\/p>\n<p>    canvas.pack()<\/p>\n<p>    def draw(event):<\/p>\n<p>        x, y = event.x, event.y<\/p>\n<p>        canvas.create_oval(x-1, y-1, x+1, y+1, fill=&#39;black&#39;)<\/p>\n<p>    canvas.bind(&#39;&lt;B1-Motion&gt;&#39;, draw)<\/p>\n<p>    root.mainloop()<\/p>\n<p>if __name__ == &quot;__main__&quot;:<\/p>\n<p>    main()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528PYGAME\u5b9e\u73b0\u9f20\u6807\u753b\u753b<\/p>\n<\/p>\n<p><p>Pygame\u662f\u4e00\u4e2a\u7528\u4e8e\u5f00\u53d1\u6e38\u620f\u7684Python\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u591a\u5a92\u4f53\u529f\u80fd\u548c\u56fe\u5f62\u5904\u7406\u80fd\u529b\u3002\u4f7f\u7528Pygame\u53ef\u4ee5\u521b\u5efa\u66f4\u590d\u6742\u7684\u9f20\u6807\u753b\u753b\u5e94\u7528\u3002<\/p>\n<\/p>\n<ol>\n<li>\u521d\u59cb\u5316Pygame<\/li>\n<\/ol>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u521d\u59cb\u5316Pygame\u5e76\u8bbe\u7f6e\u7a97\u53e3\u548c\u753b\u5e03\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pygame<\/p>\n<p>def main():<\/p>\n<p>    pygame.init()<\/p>\n<p>    screen = pygame.display.set_mode((800, 600))<\/p>\n<p>    pygame.display.set_caption(&quot;Mouse Drawing with Pygame&quot;)<\/p>\n<p>    screen.fill((255, 255, 255))<\/p>\n<p>    pygame.display.flip()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u5904\u7406\u9f20\u6807\u4e8b\u4ef6<\/li>\n<\/ol>\n<p><p>\u5728Pygame\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e8b\u4ef6\u5faa\u73af\u6765\u6355\u6349\u9f20\u6807\u4e8b\u4ef6\u3002\u6211\u4eec\u9700\u8981\u5904\u7406\u9f20\u6807\u6309\u4e0b\u3001\u79fb\u52a8\u548c\u677e\u5f00\u7684\u4e8b\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def main():<\/p>\n<p>    # ... (\u7701\u7565\u4ee3\u7801)<\/p>\n<p>    drawing = False<\/p>\n<p>    while True:<\/p>\n<p>        for event in pygame.event.get():<\/p>\n<p>            if event.type == pygame.QUIT:<\/p>\n<p>                pygame.quit()<\/p>\n<p>                return<\/p>\n<p>            elif event.type == pygame.MOUSEBUTTONDOWN:<\/p>\n<p>                drawing = True<\/p>\n<p>            elif event.type == pygame.MOUSEBUTTONUP:<\/p>\n<p>                drawing = False<\/p>\n<p>            elif event.type == pygame.MOUSEMOTION and drawing:<\/p>\n<p>                x, y = event.pos<\/p>\n<p>                pygame.draw.circle(screen, (0, 0, 0), (x, y), 2)<\/p>\n<p>                pygame.display.flip()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li>\u5b8c\u6574\u5b9e\u73b0<\/li>\n<\/ol>\n<p><p>\u7ed3\u5408\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u53ef\u4ee5\u5b9e\u73b0\u4e00\u4e2a\u57fa\u4e8ePygame\u7684\u9f20\u6807\u753b\u753b\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pygame<\/p>\n<p>def main():<\/p>\n<p>    pygame.init()<\/p>\n<p>    screen = pygame.display.set_mode((800, 600))<\/p>\n<p>    pygame.display.set_caption(&quot;Mouse Drawing with Pygame&quot;)<\/p>\n<p>    screen.fill((255, 255, 255))<\/p>\n<p>    pygame.display.flip()<\/p>\n<p>    drawing = False<\/p>\n<p>    while True:<\/p>\n<p>        for event in pygame.event.get():<\/p>\n<p>            if event.type == pygame.QUIT:<\/p>\n<p>                pygame.quit()<\/p>\n<p>                return<\/p>\n<p>            elif event.type == pygame.MOUSEBUTTONDOWN:<\/p>\n<p>                drawing = True<\/p>\n<p>            elif event.type == pygame.MOUSEBUTTONUP:<\/p>\n<p>                drawing = False<\/p>\n<p>            elif event.type == pygame.MOUSEMOTION and drawing:<\/p>\n<p>                x, y = event.pos<\/p>\n<p>                pygame.draw.circle(screen, (0, 0, 0), (x, y), 2)<\/p>\n<p>                pygame.display.flip()<\/p>\n<p>if __name__ == &quot;__main__&quot;:<\/p>\n<p>    main()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528PYQT\u5b9e\u73b0\u9f20\u6807\u753b\u753b<\/p>\n<\/p>\n<p><p>PyQt\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684GUI\u5de5\u5177\u5305\uff0c\u9002\u5408\u5f00\u53d1\u590d\u6742\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u4f7f\u7528PyQt\u53ef\u4ee5\u5b9e\u73b0\u66f4\u52a0\u7cbe\u7ec6\u548c\u590d\u6742\u7684\u9f20\u6807\u753b\u753b\u529f\u80fd\u3002<\/p>\n<\/p>\n<ol>\n<li>\u5b89\u88c5PyQt<\/li>\n<\/ol>\n<p><p>\u9996\u5148\u786e\u4fdd\u5b89\u88c5\u4e86PyQt\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install PyQt5<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u521b\u5efaPyQt\u5e94\u7528<\/li>\n<\/ol>\n<p><p>\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2aPyQt\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u8bbe\u7f6e\u4e3b\u7a97\u53e3\u548c\u753b\u5e03\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel<\/p>\n<p>from PyQt5.QtGui import QPainter, QPen<\/p>\n<p>from PyQt5.QtCore import Qt, QPoint<\/p>\n<p>class DrawingWindow(QMainWindow):<\/p>\n<p>    def __init__(self):<\/p>\n<p>        super().__init__()<\/p>\n<p>        self.setWindowTitle(&quot;Mouse Drawing with PyQt&quot;)<\/p>\n<p>        self.setGeometry(100, 100, 800, 600)<\/p>\n<p>        self.label = QLabel(self)<\/p>\n<p>        self.label.setGeometry(0, 0, 800, 600)<\/p>\n<p>        self.last_point = QPoint()<\/p>\n<p>        self.drawing = False<\/p>\n<p>    def mousePressEvent(self, event):<\/p>\n<p>        if event.button() == Qt.LeftButton:<\/p>\n<p>            self.drawing = True<\/p>\n<p>            self.last_point = event.pos()<\/p>\n<p>    def mouseMoveEvent(self, event):<\/p>\n<p>        if self.drawing:<\/p>\n<p>            painter = QPainter(self.label.pixmap())<\/p>\n<p>            pen = QPen(Qt.black, 2, Qt.SolidLine)<\/p>\n<p>            painter.setPen(pen)<\/p>\n<p>            painter.drawLine(self.last_point, event.pos())<\/p>\n<p>            self.last_point = event.pos()<\/p>\n<p>            self.update()<\/p>\n<p>    def mouseReleaseEvent(self, event):<\/p>\n<p>        if event.button() == Qt.LeftButton:<\/p>\n<p>            self.drawing = False<\/p>\n<p>def main():<\/p>\n<p>    app = QApplication([])<\/p>\n<p>    window = DrawingWindow()<\/p>\n<p>    window.show()<\/p>\n<p>    app.exec_()<\/p>\n<p>if __name__ == &quot;__main__&quot;:<\/p>\n<p>    main()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li>\u5b8c\u6574\u5b9e\u73b0<\/li>\n<\/ol>\n<p><p>\u7ed3\u5408\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u53ef\u4ee5\u901a\u8fc7PyQt\u5b9e\u73b0\u9f20\u6807\u753b\u753b\u529f\u80fd\u3002PyQt\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u56fe\u5f62\u5904\u7406\u80fd\u529b\uff0c\u53ef\u4ee5\u5b9e\u73b0\u66f4\u590d\u6742\u7684\u7ed8\u56fe\u6548\u679c\u3002<\/p>\n<\/p>\n<p><p>\u603b\u7ed3\uff1a<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e0d\u540c\u7684GUI\u5e93\u5b9e\u73b0\u9f20\u6807\u753b\u753b\u529f\u80fd\u3002Tkinter\u9002\u5408\u521d\u5b66\u8005\uff0c\u7b80\u5355\u6613\u7528\uff1bPygame\u9002\u5408\u6e38\u620f\u5f00\u53d1\uff0c\u63d0\u4f9b\u4e30\u5bcc\u7684\u56fe\u5f62\u5904\u7406\u529f\u80fd\uff1bPyQt\u529f\u80fd\u5f3a\u5927\uff0c\u9002\u5408\u5f00\u53d1\u590d\u6742\u5e94\u7528\u3002\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5feb\u901f\u5b9e\u73b0\u9f20\u6807\u753b\u753b\u5e94\u7528\u3002\u65e0\u8bba\u9009\u62e9\u54ea\u4e2a\u5e93\uff0c\u638c\u63e1\u5176\u57fa\u672c\u4f7f\u7528\u65b9\u6cd5\u548c\u4e8b\u4ef6\u5904\u7406\u673a\u5236\u90fd\u662f\u5b9e\u73b0\u753b\u56fe\u529f\u80fd\u7684\u5173\u952e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u753b\u753b\u5e94\u7528\u7a0b\u5e8f\uff1f<\/strong><br \/>\u8981\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u753b\u753b\u5e94\u7528\u7a0b\u5e8f\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>tkinter<\/code>\u5e93\u3002\u8fd9\u4e2a\u5e93\u63d0\u4f9b\u4e86\u56fe\u5f62\u7528\u6237\u754c\u9762\uff08GUI\uff09\u529f\u80fd\uff0c\u80fd\u591f\u65b9\u4fbf\u5730\u6355\u6349\u9f20\u6807\u4e8b\u4ef6\u5e76\u5728\u7a97\u53e3\u4e2d\u7ed8\u56fe\u3002\u9996\u5148\uff0c\u5bfc\u5165<code>tkinter<\/code>\u5e76\u8bbe\u7f6e\u753b\u5e03\uff0c\u6dfb\u52a0\u9f20\u6807\u4e8b\u4ef6\u5904\u7406\u7a0b\u5e8f\u6765\u6355\u6349\u9f20\u6807\u7684\u6309\u4e0b\u3001\u79fb\u52a8\u548c\u91ca\u653e\u4e8b\u4ef6\uff0c\u4ee5\u4fbf\u5728\u753b\u5e03\u4e0a\u7ed8\u5236\u7ebf\u6761\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<pre><code class=\"language-python\">import tkinter as tk\n\ndef paint(event):\n    x, y = event.x, event.y\n    canvas.create_line(x, y, x+1, y+1, fill=&#39;black&#39;)\n\nroot = tk.Tk()\ncanvas = tk.Canvas(root, bg=&#39;white&#39;, width=400, height=400)\ncanvas.pack()\ncanvas.bind(&quot;&lt;B1-Motion&gt;&quot;, paint)\n\nroot.mainloop()\n<\/code><\/pre>\n<p><strong>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u54ea\u4e9b\u5e93\u6765\u5b9e\u73b0\u753b\u753b\u529f\u80fd\uff1f<\/strong><br \/>\u9664\u4e86<code>tkinter<\/code>\uff0c\u8fd8\u6709\u5176\u4ed6\u4e00\u4e9b\u5e93\u53ef\u4ee5\u7528\u4e8e\u521b\u5efa\u753b\u753b\u5e94\u7528\u7a0b\u5e8f\u3002\u4f8b\u5982\uff0c<code>pygame<\/code>\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684\u6e38\u620f\u5f00\u53d1\u5e93\uff0c\u80fd\u591f\u5904\u7406\u590d\u6742\u7684\u56fe\u5f62\u548c\u7528\u6237\u8f93\u5165\u3002<code>PyQt<\/code>\u548c<code>wxPython<\/code>\u4e5f\u662f\u53ef\u7528\u4e8e\u521b\u5efa\u56fe\u5f62\u754c\u9762\u7684\u5e93\uff0c\u5b83\u4eec\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u63a7\u4ef6\u548c\u7075\u6d3b\u7684\u5e03\u5c40\u9009\u9879\uff0c\u9002\u5408\u66f4\u590d\u6742\u7684\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u3002<\/p>\n<p><strong>\u5982\u4f55\u63d0\u5347\u6211\u7684Python\u753b\u753b\u5e94\u7528\u7a0b\u5e8f\u7684\u7528\u6237\u4f53\u9a8c\uff1f<\/strong><br \/>\u63d0\u5347\u7528\u6237\u4f53\u9a8c\u7684\u65b9\u5f0f\u6709\u5f88\u591a\u3002\u9996\u5148\uff0c\u53ef\u4ee5\u6dfb\u52a0\u989c\u8272\u9009\u62e9\u5668\uff0c\u4f7f\u7528\u6237\u80fd\u591f\u9009\u62e9\u4e0d\u540c\u7684\u753b\u7b14\u989c\u8272\u3002\u5176\u6b21\uff0c\u63d0\u4f9b\u6e05\u7a7a\u753b\u5e03\u7684\u529f\u80fd\uff0c\u8ba9\u7528\u6237\u53ef\u4ee5\u8f7b\u677e\u91cd\u7f6e\u4ed6\u4eec\u7684\u4f5c\u54c1\u3002\u6b64\u5916\uff0c\u8003\u8651\u5b9e\u73b0\u4fdd\u5b58\u56fe\u50cf\u7684\u529f\u80fd\uff0c\u4ee5\u4fbf\u7528\u6237\u80fd\u591f\u5c06\u4ed6\u4eec\u7684\u521b\u4f5c\u4fdd\u5b58\u5230\u672c\u5730\u3002\u6700\u540e\uff0c\u589e\u52a0\u753b\u7b14\u5bbd\u5ea6\u9009\u9879\uff0c\u8ba9\u7528\u6237\u80fd\u591f\u6839\u636e\u9700\u8981\u8c03\u6574\u7ebf\u6761\u7684\u7c97\u7ec6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u4f7f\u7528\u9f20\u6807\u753b\u753b\uff0c\u53ef\u4ee5\u901a\u8fc7\u56fe\u5f62\u7528\u6237\u754c\u9762\uff08GUI\uff09\u5e93\uff0c\u5982Tkinter\u3001Pygame\u6216PyQt\u7b49\u6765\u5b9e [&hellip;]","protected":false},"author":3,"featured_media":1010924,"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\/1010913"}],"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=1010913"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1010913\/revisions"}],"predecessor-version":[{"id":1010926,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1010913\/revisions\/1010926"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1010924"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1010913"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1010913"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1010913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}