{"id":1169470,"date":"2025-01-15T16:10:54","date_gmt":"2025-01-15T08:10:54","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1169470.html"},"modified":"2025-01-15T16:10:56","modified_gmt":"2025-01-15T08:10:56","slug":"python%e5%a6%82%e4%bd%95%e6%8e%a5%e6%94%b6%e9%94%ae%e7%9b%98%e9%bc%a0%e6%a0%87%e4%ba%8b%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1169470.html","title":{"rendered":"python\u5982\u4f55\u63a5\u6536\u952e\u76d8\u9f20\u6807\u4e8b\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26070432\/07ddb87a-c360-485b-8812-3d8fc9689bf2.webp\" alt=\"python\u5982\u4f55\u63a5\u6536\u952e\u76d8\u9f20\u6807\u4e8b\u4ef6\" \/><\/p>\n<p><p> <strong>Python\u63a5\u6536\u952e\u76d8\u9f20\u6807\u4e8b\u4ef6\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\uff1a\u4f7f\u7528Pygame\u5e93\u3001\u4f7f\u7528PyAutoGUI\u5e93\u3001\u4f7f\u7528Pynput\u5e93<\/strong>\u3002\u5176\u4e2d\uff0cPynput\u5e93\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u4e14\u6613\u4e8e\u4f7f\u7528\u7684\u5e93\uff0c\u9002\u5408\u5904\u7406\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6\u3002<strong>\u5728Pynput\u5e93\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u76d1\u542c\u5668\u6765\u6355\u6349\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6<\/strong>\u3002\u4e0b\u9762\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u4f7f\u7528Pynput\u5e93\u6765\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001Pygame\u5e93<\/h3>\n<\/p>\n<p><h4>1\u3001\u7b80\u4ecb<\/h4>\n<\/p>\n<p><p>Pygame\u662fPython\u4e2d\u4e00\u4e2a\u975e\u5e38\u6d41\u884c\u7684\u6e38\u620f\u5f00\u53d1\u5e93\uff0c\u5c3d\u7ba1\u5176\u4e3b\u8981\u76ee\u7684\u662f\u7528\u4e8e\u5f00\u53d1\u6e38\u620f\uff0c\u4f46\u5b83\u4e5f\u63d0\u4f9b\u4e86\u6355\u6349\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6\u7684\u529f\u80fd\u3002Pygame\u7684\u4e8b\u4ef6\u5904\u7406\u6a21\u578b\u975e\u5e38\u9002\u5408\u5b9e\u65f6\u5904\u7406\u8f93\u5165\u4e8b\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u5b89\u88c5<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5Pygame\u5e93\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pygame<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u793a\u4f8b\u4ee3\u7801<\/h4>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528Pygame\u6355\u6349\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pygame<\/p>\n<p>import sys<\/p>\n<h2><strong>\u521d\u59cb\u5316Pygame<\/strong><\/h2>\n<p>pygame.init()<\/p>\n<h2><strong>\u8bbe\u7f6e\u7a97\u53e3\u5927\u5c0f<\/strong><\/h2>\n<p>screen = pygame.display.set_mode((640, 480))<\/p>\n<h2><strong>\u8bbe\u7f6e\u7a97\u53e3\u6807\u9898<\/strong><\/h2>\n<p>pygame.display.set_caption(&quot;Pygame Keyboard and Mouse Events&quot;)<\/p>\n<h2><strong>\u4e3b\u5faa\u73af<\/strong><\/h2>\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>            sys.exit()<\/p>\n<p>        elif event.type == pygame.KEYDOWN:<\/p>\n<p>            print(f&quot;Key {pygame.key.name(event.key)} pressed&quot;)<\/p>\n<p>        elif event.type == pygame.MOUSEBUTTONDOWN:<\/p>\n<p>            print(f&quot;Mouse button {event.button} pressed at {event.pos}&quot;)<\/p>\n<p>    screen.fill((0, 0, 0))<\/p>\n<p>    pygame.display.flip()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2aPygame\u7a97\u53e3\uff0c\u5e76\u5728\u4e3b\u5faa\u73af\u4e2d\u6355\u6349\u952e\u76d8\u6309\u4e0b\u4e8b\u4ef6\u548c\u9f20\u6807\u6309\u4e0b\u4e8b\u4ef6\u3002<code>pygame.key.name(event.key)<\/code>\u7528\u4e8e\u83b7\u53d6\u6309\u4e0b\u7684\u952e\u540d\uff0c<code>event.button<\/code>\u7528\u4e8e\u83b7\u53d6\u9f20\u6807\u6309\u94ae\uff0c<code>event.pos<\/code>\u7528\u4e8e\u83b7\u53d6\u9f20\u6807\u6309\u4e0b\u65f6\u7684\u5750\u6807\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001PyAutoGUI\u5e93<\/h3>\n<\/p>\n<p><h4>1\u3001\u7b80\u4ecb<\/h4>\n<\/p>\n<p><p>PyAutoGUI\u662f\u4e00\u4e2a\u7528\u4e8e\u81ea\u52a8\u5316\u56fe\u5f62\u7528\u6237\u754c\u9762\u7684Python\u5e93\uff0c\u652f\u6301\u8de8\u5e73\u53f0\u64cd\u4f5c\u3002\u9664\u4e86\u81ea\u52a8\u5316\u64cd\u4f5c\u5916\uff0cPyAutoGUI\u4e5f\u53ef\u4ee5\u6355\u6349\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u5b89\u88c5<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5PyAutoGUI\u5e93\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pyautogui<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u793a\u4f8b\u4ee3\u7801<\/h4>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528PyAutoGUI\u6355\u6349\u9f20\u6807\u4e8b\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pyautogui<\/p>\n<p>import time<\/p>\n<p>def on_click(x, y, button, pressed):<\/p>\n<p>    if pressed:<\/p>\n<p>        print(f&quot;Mouse button {button} pressed at ({x}, {y})&quot;)<\/p>\n<h2><strong>\u76d1\u542c\u9f20\u6807\u70b9\u51fb\u4e8b\u4ef6<\/strong><\/h2>\n<p>pyautogui.mouseInfo()<\/p>\n<p>pyautogui.click(10, 10, button=&#39;left&#39;)<\/p>\n<p>while True:<\/p>\n<p>    x, y = pyautogui.position()<\/p>\n<p>    print(f&quot;Mouse position: ({x}, {y})&quot;)<\/p>\n<p>    time.sleep(0.5)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>pyautogui.mouseInfo()<\/code>\u65b9\u6cd5\u6765\u83b7\u53d6\u5f53\u524d\u9f20\u6807\u4f4d\u7f6e\uff0c\u5e76\u4f7f\u7528<code>pyautogui.click()<\/code>\u65b9\u6cd5\u6a21\u62df\u9f20\u6807\u70b9\u51fb\u4e8b\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001Pynput\u5e93<\/h3>\n<\/p>\n<p><h4>1\u3001\u7b80\u4ecb<\/h4>\n<\/p>\n<p><p>Pynput\u662f\u4e00\u4e2a\u7528\u4e8e\u63a7\u5236\u548c\u76d1\u89c6\u8f93\u5165\u8bbe\u5907\u7684Python\u5e93\uff0c\u652f\u6301\u6355\u6349\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6\u3002Pynput\u5e93\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u63a5\u53e3\u6765\u76d1\u542c\u548c\u63a7\u5236\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u5b89\u88c5<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5Pynput\u5e93\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pynput<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u6355\u6349\u952e\u76d8\u4e8b\u4ef6<\/h4>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528Pynput\u6355\u6349\u952e\u76d8\u4e8b\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pynput import keyboard<\/p>\n<p>def on_press(key):<\/p>\n<p>    try:<\/p>\n<p>        print(f&quot;Key {key.char} pressed&quot;)<\/p>\n<p>    except AttributeError:<\/p>\n<p>        print(f&quot;Special key {key} pressed&quot;)<\/p>\n<p>def on_release(key):<\/p>\n<p>    print(f&quot;Key {key} released&quot;)<\/p>\n<p>    if key == keyboard.Key.esc:<\/p>\n<p>        return False<\/p>\n<p>with keyboard.Listener(on_press=on_press, on_release=on_release) as listener:<\/p>\n<p>    listener.join()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e24\u4e2a\u51fd\u6570<code>on_press<\/code>\u548c<code>on_release<\/code>\uff0c\u5206\u522b\u7528\u4e8e\u5904\u7406\u952e\u76d8\u6309\u4e0b\u548c\u91ca\u653e\u4e8b\u4ef6\u3002\u4f7f\u7528<code>keyboard.Listener<\/code>\u76d1\u542c\u952e\u76d8\u4e8b\u4ef6\uff0c\u5e76\u5728\u76d1\u542c\u5668\u4e2d\u6307\u5b9a<code>on_press<\/code>\u548c<code>on_release<\/code>\u51fd\u6570\u3002<\/p>\n<\/p>\n<p><h4>4\u3001\u6355\u6349\u9f20\u6807\u4e8b\u4ef6<\/h4>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528Pynput\u6355\u6349\u9f20\u6807\u4e8b\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pynput import mouse<\/p>\n<p>def on_click(x, y, button, pressed):<\/p>\n<p>    if pressed:<\/p>\n<p>        print(f&quot;Mouse button {button} pressed at ({x}, {y})&quot;)<\/p>\n<p>    else:<\/p>\n<p>        print(f&quot;Mouse button {button} released at ({x}, {y})&quot;)<\/p>\n<p>def on_scroll(x, y, dx, dy):<\/p>\n<p>    print(f&quot;Mouse scrolled at ({x}, {y}) with delta ({dx}, {dy})&quot;)<\/p>\n<p>with mouse.Listener(on_click=on_click, on_scroll=on_scroll) as listener:<\/p>\n<p>    listener.join()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e24\u4e2a\u51fd\u6570<code>on_click<\/code>\u548c<code>on_scroll<\/code>\uff0c\u5206\u522b\u7528\u4e8e\u5904\u7406\u9f20\u6807\u70b9\u51fb\u548c\u6eda\u52a8\u4e8b\u4ef6\u3002\u4f7f\u7528<code>mouse.Listener<\/code>\u76d1\u542c\u9f20\u6807\u4e8b\u4ef6\uff0c\u5e76\u5728\u76d1\u542c\u5668\u4e2d\u6307\u5b9a<code>on_click<\/code>\u548c<code>on_scroll<\/code>\u51fd\u6570\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u7ed3\u8bba<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u5185\u5bb9\uff0c\u6211\u4eec\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528Pygame\u3001PyAutoGUI\u548cPynput\u5e93\u6765\u6355\u6349\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u72ec\u7279\u7684\u4f18\u70b9\u548c\u9002\u7528\u573a\u666f\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u8fdb\u884c\u5f00\u53d1\u3002<strong>Pynput\u5e93\u7531\u4e8e\u5176\u7b80\u6d01\u7684\u63a5\u53e3\u548c\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u7279\u522b\u9002\u5408\u7528\u4e8e\u5904\u7406\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6\uff0c\u662f\u63a8\u8350\u4f7f\u7528\u7684\u5e93<\/strong>\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u6355\u83b7\u952e\u76d8\u4e8b\u4ef6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>pynput<\/code>\u5e93\u6765\u6355\u83b7\u952e\u76d8\u4e8b\u4ef6\u3002\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a\u952e\u76d8\u76d1\u542c\u5668\uff0c\u53ef\u4ee5\u8f7b\u677e\u76d1\u63a7\u6309\u952e\u7684\u6309\u4e0b\u548c\u91ca\u653e\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u4ee3\u7801\uff1a  <\/p>\n<pre><code class=\"language-python\">from pynput import keyboard\n\ndef on_press(key):\n    try:\n        print(f&#39;\u6309\u4e0b\u4e86\u952e: {key.char}&#39;)\n    except AttributeError:\n        print(f&#39;\u6309\u4e0b\u4e86\u7279\u6b8a\u952e: {key}&#39;)\n\ndef on_release(key):\n    print(f&#39;\u91ca\u653e\u4e86\u952e: {key}&#39;)\n    if key == keyboard.Key.esc:\n        # \u505c\u6b62\u76d1\u542c\n        return False\n\n# \u542f\u52a8\u76d1\u542c\u5668\nwith keyboard.Listener(on_press=on_press, on_release=on_release) as listener:\n    listener.join()\n<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u4e2a\u793a\u4f8b\uff0c\u4f60\u53ef\u4ee5\u76d1\u63a7\u952e\u76d8\u7684\u6240\u6709\u6d3b\u52a8\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u76d1\u542c\u9f20\u6807\u4e8b\u4ef6\uff1f<\/strong><br \/>\u4e0e\u952e\u76d8\u4e8b\u4ef6\u7c7b\u4f3c\uff0c<code>pynput<\/code>\u5e93\u4e5f\u53ef\u4ee5\u7528\u4e8e\u76d1\u542c\u9f20\u6807\u4e8b\u4ef6\u3002\u4f7f\u7528\u9f20\u6807\u76d1\u542c\u5668\u53ef\u4ee5\u6355\u83b7\u9f20\u6807\u7684\u79fb\u52a8\u3001\u70b9\u51fb\u548c\u6eda\u52a8\u4e8b\u4ef6\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u57fa\u672c\u793a\u4f8b\uff1a  <\/p>\n<pre><code class=\"language-python\">from pynput import mouse\n\ndef on_click(x, y, button, pressed):\n    if pressed:\n        print(f&#39;\u9f20\u6807\u70b9\u51fb\u4f4d\u7f6e: ({x}, {y})\uff0c\u6309\u94ae: {button}&#39;)\n    else:\n        print(f&#39;\u9f20\u6807\u91ca\u653e\u4f4d\u7f6e: ({x}, {y})\uff0c\u6309\u94ae: {button}&#39;)\n\ndef on_move(x, y):\n    print(f&#39;\u9f20\u6807\u79fb\u52a8\u5230: ({x}, {y})&#39;)\n\n# \u542f\u52a8\u76d1\u542c\u5668\nwith mouse.Listener(on_click=on_click, on_move=on_move) as listener:\n    listener.join()\n<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u4e2a\u4ee3\u7801\u7247\u6bb5\uff0c\u53ef\u4ee5\u5b9e\u65f6\u8ddf\u8e2a\u9f20\u6807\u7684\u6d3b\u52a8\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u76d1\u542c\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6\u6709\u4ec0\u4e48\u9650\u5236\uff1f<\/strong><br \/>\u5c3d\u7ba1<code>pynput<\/code>\u5e93\u975e\u5e38\u5f3a\u5927\uff0c\u4f46\u5728\u67d0\u4e9b\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u53ef\u80fd\u4f1a\u53d7\u5230\u6743\u9650\u7684\u9650\u5236\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u811a\u672c\u3002\u6b64\u5916\uff0c\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u5bf9\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6\u7684\u652f\u6301\u4e5f\u53ef\u80fd\u5b58\u5728\u5dee\u5f02\uff0c\u56e0\u6b64\u5728\u5f00\u53d1\u65f6\u8981\u8003\u8651\u76ee\u6807\u7528\u6237\u7684\u73af\u5883\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5904\u7406\u591a\u4e2a\u4e8b\u4ef6\uff1f<\/strong><br \/>\u5f53\u9700\u8981\u540c\u65f6\u5904\u7406\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6\u65f6\uff0c\u53ef\u4ee5\u521b\u5efa\u4e24\u4e2a\u76d1\u542c\u5668\u5e76\u8ba9\u5b83\u4eec\u5e76\u884c\u8fd0\u884c\u3002\u4f7f\u7528<code>threading<\/code>\u5e93\u53ef\u4ee5\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5904\u7406\u4e24\u4e2a\u4e8b\u4ef6\u7684\u793a\u4f8b\uff1a  <\/p>\n<pre><code class=\"language-python\">import threading\nfrom pynput import keyboard, mouse\n\ndef keyboard_listener():\n    with keyboard.Listener(on_press=on_press, on_release=on_release) as listener:\n        listener.join()\n\ndef mouse_listener():\n    with mouse.Listener(on_click=on_click, on_move=on_move) as listener:\n        listener.join()\n\n# \u542f\u52a8\u4e24\u4e2a\u76d1\u542c\u5668\nkeyboard_thread = threading.Thread(target=keyboard_listener)\nmouse_thread = threading.Thread(target=mouse_listener)\n\nkeyboard_thread.start()\nmouse_thread.start()\n\nkeyboard_thread.join()\nmouse_thread.join()\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u786e\u4fdd\u540c\u65f6\u6355\u83b7\u952e\u76d8\u548c\u9f20\u6807\u4e8b\u4ef6\uff0c\u63d0\u5347\u4ea4\u4e92\u4f53\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u63a5\u6536\u952e\u76d8\u9f20\u6807\u4e8b\u4ef6\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\uff1a\u4f7f\u7528Pygame\u5e93\u3001\u4f7f\u7528PyAutoGUI\u5e93\u3001\u4f7f\u7528Pynput\u5e93\u3002\u5176 [&hellip;]","protected":false},"author":3,"featured_media":1169475,"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\/1169470"}],"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=1169470"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1169470\/revisions"}],"predecessor-version":[{"id":1169478,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1169470\/revisions\/1169478"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1169475"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1169470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1169470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1169470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}