{"id":954984,"date":"2024-12-27T02:07:21","date_gmt":"2024-12-26T18:07:21","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/954984.html"},"modified":"2024-12-27T02:07:23","modified_gmt":"2024-12-26T18:07:23","slug":"python%e4%b8%adtext%e5%a6%82%e4%bd%95%e9%94%81%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/954984.html","title":{"rendered":"python\u4e2dtext\u5982\u4f55\u9501\u5b9a"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25095031\/7565020f-f6eb-435e-8b07-db5cf19bd03e.webp\" alt=\"python\u4e2dtext\u5982\u4f55\u9501\u5b9a\" \/><\/p>\n<p><p> \u5728Python\u4e2d\uff0c\u9501\u5b9a\u6587\u672c\u5bf9\u8c61\u7684\u64cd\u4f5c\u901a\u5e38\u4e0e\u7ebf\u7a0b\u540c\u6b65\u6216\u5e76\u53d1\u7f16\u7a0b\u76f8\u5173\u3002<strong>\u4f7f\u7528\u7ebf\u7a0b\u9501\u3001\u907f\u514d\u6570\u636e\u7ade\u4e89\u3001\u786e\u4fdd\u7ebf\u7a0b\u5b89\u5168<\/strong>\u662f\u9501\u5b9a\u6587\u672c\u7684\u6838\u5fc3\u65b9\u6cd5\u3002\u8fd9\u91cc\u6211\u4eec\u5c06\u8be6\u7ec6\u8ba8\u8bba\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e76\u63a2\u8ba8\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0\u6587\u672c\u7684\u9501\u5b9a\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u7ebf\u7a0b\u9501<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c<code>threading<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u65b9\u5f0f\u6765\u4f7f\u7528\u9501\u3002\u9501\u662f\u4e00\u4e2a\u540c\u6b65\u539f\u8bed\uff0c\u7528\u6765\u786e\u4fdd\u5728\u591a\u7ebf\u7a0b\u73af\u5883\u4e2d\uff0c\u53ea\u6709\u4e00\u4e2a\u7ebf\u7a0b\u53ef\u4ee5\u8bbf\u95ee\u5171\u4eab\u8d44\u6e90\u3002\u5bf9\u4e8e\u6587\u672c\u9501\u5b9a\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u9501\u6765\u4fdd\u62a4\u5bf9\u6587\u672c\u5bf9\u8c61\u7684\u8bbf\u95ee\u3002<\/p>\n<\/p>\n<p><h4>1.1 \u521b\u5efa\u9501\u5bf9\u8c61<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u9501\u5bf9\u8c61\u3002\u53ef\u4ee5\u4f7f\u7528<code>threading.Lock()<\/code>\u6765\u521b\u5efa\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import threading<\/p>\n<p>lock = threading.Lock()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>1.2 \u4f7f\u7528\u9501<\/h4>\n<\/p>\n<p><p>\u4e00\u65e6\u9501\u5bf9\u8c61\u521b\u5efa\u6210\u529f\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>acquire()<\/code>\u65b9\u6cd5\u6765\u9501\u5b9a\u8d44\u6e90\uff0c\u5e76\u4f7f\u7528<code>release()<\/code>\u65b9\u6cd5\u6765\u89e3\u9501\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">text_data = &quot;Initial Text&quot;<\/p>\n<p>def modify_text():<\/p>\n<p>    global text_data<\/p>\n<p>    lock.acquire()<\/p>\n<p>    try:<\/p>\n<p>        # \u8fd9\u91cc\u662f\u5bf9\u5171\u4eab\u6587\u672c\u8d44\u6e90\u7684\u64cd\u4f5c<\/p>\n<p>        text_data += &quot; Modified by thread&quot;<\/p>\n<p>    finally:<\/p>\n<p>        lock.release()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u591a\u7ebf\u7a0b\u73af\u5883\u4e2d\uff0c\u4efb\u4f55\u65f6\u5019\u4f60\u9700\u8981\u8bbf\u95ee\u6216\u4fee\u6539\u5171\u4eab\u7684\u6587\u672c\u5bf9\u8c61\uff0c\u90fd\u5e94\u5f53\u4f7f\u7528\u9501\u6765\u786e\u4fdd\u7ebf\u7a0b\u5b89\u5168\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u907f\u514d\u6570\u636e\u7ade\u4e89<\/h3>\n<\/p>\n<p><p>\u6570\u636e\u7ade\u4e89\u662f\u6307\u591a\u4e2a\u7ebf\u7a0b\u5728\u6ca1\u6709\u540c\u6b65\u7684\u60c5\u51b5\u4e0b\u540c\u65f6\u8bbf\u95ee\u548c\u4fee\u6539\u5171\u4eab\u6570\u636e\uff0c\u5bfc\u81f4\u6570\u636e\u4e0d\u4e00\u81f4\u3002\u4f7f\u7528\u9501\u53ef\u4ee5\u6709\u6548\u5730\u907f\u514d\u6570\u636e\u7ade\u4e89\u3002<\/p>\n<\/p>\n<p><h4>2.1 \u6570\u636e\u7ade\u4e89\u7684\u98ce\u9669<\/h4>\n<\/p>\n<p><p>\u5728\u6ca1\u6709\u9501\u7684\u60c5\u51b5\u4e0b\uff0c\u591a\u4e2a\u7ebf\u7a0b\u53ef\u4ee5\u540c\u65f6\u4fee\u6539\u6587\u672c\u5bf9\u8c61\uff0c\u5bfc\u81f4\u6570\u636e\u88ab\u7834\u574f\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import threading<\/p>\n<p>text_data = &quot;Initial Text&quot;<\/p>\n<p>def un<a href=\"https:\/\/docs.pingcode.com\/agile\/agile-at-scale\/what-is-safe\" target=\"_blank\">SAFe<\/a>_modify_text():<\/p>\n<p>    global text_data<\/p>\n<p>    text_data += &quot; Modified&quot;<\/p>\n<p>threads = []<\/p>\n<p>for _ in range(5):<\/p>\n<p>    thread = threading.Thread(target=unsafe_modify_text)<\/p>\n<p>    threads.append(thread)<\/p>\n<p>    thread.start()<\/p>\n<p>for thread in threads:<\/p>\n<p>    thread.join()<\/p>\n<p>print(text_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u7531\u4e8e\u6ca1\u6709\u9501\uff0c\u591a\u4e2a\u7ebf\u7a0b\u53ef\u80fd\u4f1a\u540c\u65f6\u8bbf\u95ee\u5e76\u4fee\u6539<code>text_data<\/code>\uff0c\u5bfc\u81f4\u6700\u7ec8\u7684\u8f93\u51fa\u4e0d\u786e\u5b9a\u3002<\/p>\n<\/p>\n<p><h4>2.2 \u89e3\u51b3\u65b9\u6848<\/h4>\n<\/p>\n<p><p>\u901a\u8fc7\u4f7f\u7528\u9501\uff0c\u53ef\u4ee5\u786e\u4fdd\u6bcf\u6b21\u53ea\u6709\u4e00\u4e2a\u7ebf\u7a0b\u53ef\u4ee5\u8bbf\u95ee\u548c\u4fee\u6539<code>text_data<\/code>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import threading<\/p>\n<p>lock = threading.Lock()<\/p>\n<p>text_data = &quot;Initial Text&quot;<\/p>\n<p>def safe_modify_text():<\/p>\n<p>    global text_data<\/p>\n<p>    lock.acquire()<\/p>\n<p>    try:<\/p>\n<p>        text_data += &quot; Modified&quot;<\/p>\n<p>    finally:<\/p>\n<p>        lock.release()<\/p>\n<p>threads = []<\/p>\n<p>for _ in range(5):<\/p>\n<p>    thread = threading.Thread(target=safe_modify_text)<\/p>\n<p>    threads.append(thread)<\/p>\n<p>    thread.start()<\/p>\n<p>for thread in threads:<\/p>\n<p>    thread.join()<\/p>\n<p>print(text_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u786e\u4fdd\u7ebf\u7a0b\u5b89\u5168<\/h3>\n<\/p>\n<p><p>\u5728\u5e76\u53d1\u7f16\u7a0b\u4e2d\uff0c\u7ebf\u7a0b\u5b89\u5168\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u6982\u5ff5\u3002\u5b83\u6307\u7684\u662f\u7a0b\u5e8f\u5728\u591a\u7ebf\u7a0b\u73af\u5883\u4e2d\u80fd\u591f\u6b63\u786e\u8fd0\u884c\uff0c\u4e0d\u4f1a\u56e0\u4e3a\u591a\u4e2a\u7ebf\u7a0b\u7684\u540c\u65f6\u6267\u884c\u800c\u5bfc\u81f4\u6570\u636e\u9519\u8bef\u3002<\/p>\n<\/p>\n<p><h4>3.1 \u4e3a\u4ec0\u4e48\u9700\u8981\u7ebf\u7a0b\u5b89\u5168<\/h4>\n<\/p>\n<p><p>\u5728\u591a\u7ebf\u7a0b\u7a0b\u5e8f\u4e2d\uff0c\u591a\u4e2a\u7ebf\u7a0b\u53ef\u80fd\u4f1a\u540c\u65f6\u8bfb\u5199\u5171\u4eab\u6570\u636e\u3002\u5982\u679c\u4e0d\u91c7\u53d6\u540c\u6b65\u63aa\u65bd\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6570\u636e\u4e0d\u4e00\u81f4\u3001\u7a0b\u5e8f\u5d29\u6e83\u7b49\u95ee\u9898\u3002<\/p>\n<\/p>\n<p><h4>3.2 \u5982\u4f55\u5b9e\u73b0\u7ebf\u7a0b\u5b89\u5168<\/h4>\n<\/p>\n<p><p>\u901a\u8fc7\u4f7f\u7528\u540c\u6b65\u539f\u8bed\uff08\u5982\u9501\u3001\u4fe1\u53f7\u91cf\u3001\u6761\u4ef6\u53d8\u91cf\u7b49\uff09\uff0c\u53ef\u4ee5\u786e\u4fdd\u7ebf\u7a0b\u5b89\u5168\u3002\u5bf9\u4e8e\u6587\u672c\u9501\u5b9a\uff0c\u9501\u662f\u6700\u5e38\u7528\u7684\u540c\u6b65\u539f\u8bed\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import threading<\/p>\n<p>lock = threading.Lock()<\/p>\n<p>text_data = &quot;Initial Text&quot;<\/p>\n<p>def thread_safe_modify_text():<\/p>\n<p>    global text_data<\/p>\n<p>    with lock:  # \u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u6765\u81ea\u52a8\u83b7\u53d6\u548c\u91ca\u653e\u9501<\/p>\n<p>        text_data += &quot; Modified&quot;<\/p>\n<p>threads = []<\/p>\n<p>for _ in range(5):<\/p>\n<p>    thread = threading.Thread(target=thread_safe_modify_text)<\/p>\n<p>    threads.append(thread)<\/p>\n<p>    thread.start()<\/p>\n<p>for thread in threads:<\/p>\n<p>    thread.join()<\/p>\n<p>print(text_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5176\u4ed6\u540c\u6b65\u539f\u8bed<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u9501\u4e4b\u5916\uff0cPython\u8fd8\u63d0\u4f9b\u4e86\u5176\u4ed6\u540c\u6b65\u539f\u8bed\uff0c\u5982\u4fe1\u53f7\u91cf\u3001\u4e8b\u4ef6\u3001\u6761\u4ef6\u53d8\u91cf\u7b49\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u540c\u6b65\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<p><h4>4.1 \u4fe1\u53f7\u91cf<\/h4>\n<\/p>\n<p><p>\u4fe1\u53f7\u91cf\u5141\u8bb8\u6307\u5b9a\u591a\u4e2a\u7ebf\u7a0b\u540c\u65f6\u8bbf\u95ee\u5171\u4eab\u8d44\u6e90\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u4e00\u4e2a\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import threading<\/p>\n<p>semaphore = threading.Semaphore(2)  # \u5141\u8bb8\u4e24\u4e2a\u7ebf\u7a0b\u540c\u65f6\u8bbf\u95ee<\/p>\n<p>text_data = &quot;Initial Text&quot;<\/p>\n<p>def semaphore_modify_text():<\/p>\n<p>    global text_data<\/p>\n<p>    semaphore.acquire()<\/p>\n<p>    try:<\/p>\n<p>        text_data += &quot; Modified&quot;<\/p>\n<p>    finally:<\/p>\n<p>        semaphore.release()<\/p>\n<p>threads = []<\/p>\n<p>for _ in range(5):<\/p>\n<p>    thread = threading.Thread(target=semaphore_modify_text)<\/p>\n<p>    threads.append(thread)<\/p>\n<p>    thread.start()<\/p>\n<p>for thread in threads:<\/p>\n<p>    thread.join()<\/p>\n<p>print(text_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4.2 \u4e8b\u4ef6<\/h4>\n<\/p>\n<p><p>\u4e8b\u4ef6\u7528\u4e8e\u7ebf\u7a0b\u4e4b\u95f4\u7684\u4fe1\u53f7\u4f20\u9012\uff0c\u5141\u8bb8\u4e00\u4e2a\u7ebf\u7a0b\u7b49\u5f85\u53e6\u4e00\u4e2a\u7ebf\u7a0b\u7684\u4fe1\u53f7\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import threading<\/p>\n<p>event = threading.Event()<\/p>\n<p>text_data = &quot;Initial Text&quot;<\/p>\n<p>def w<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>t_for_event():<\/p>\n<p>    print(&quot;Waiting for event...&quot;)<\/p>\n<p>    event.wait()  # \u7b49\u5f85\u4e8b\u4ef6\u88ab\u8bbe\u7f6e<\/p>\n<p>    print(&quot;Event received, modifying text.&quot;)<\/p>\n<p>    global text_data<\/p>\n<p>    text_data += &quot; Modified&quot;<\/p>\n<p>thread = threading.Thread(target=wait_for_event)<\/p>\n<p>thread.start()<\/p>\n<h2><strong>\u5728\u5176\u4ed6\u6761\u4ef6\u6ee1\u8db3\u65f6\u8bbe\u7f6e\u4e8b\u4ef6<\/strong><\/h2>\n<p>event.set()  # \u8bbe\u7f6e\u4e8b\u4ef6\uff0c\u901a\u77e5\u7b49\u5f85\u7684\u7ebf\u7a0b<\/p>\n<p>thread.join()<\/p>\n<p>print(text_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\u9501\u5b9a\u6587\u672c\u5bf9\u8c61\u901a\u5e38\u4e0e\u7ebf\u7a0b\u540c\u6b65\u548c\u5e76\u53d1\u7f16\u7a0b\u76f8\u5173\u3002\u901a\u8fc7\u4f7f\u7528\u7ebf\u7a0b\u9501\u3001\u907f\u514d\u6570\u636e\u7ade\u4e89\u3001\u786e\u4fdd\u7ebf\u7a0b\u5b89\u5168\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u4fdd\u62a4\u5171\u4eab\u6587\u672c\u5bf9\u8c61\u3002\u5728\u591a\u7ebf\u7a0b\u73af\u5883\u4e2d\uff0c\u4f7f\u7528\u5408\u9002\u7684\u540c\u6b65\u539f\u8bed\uff08\u5982\u9501\u3001\u4fe1\u53f7\u91cf\u3001\u4e8b\u4ef6\u7b49\uff09\u53ef\u4ee5\u786e\u4fdd\u7a0b\u5e8f\u7684\u6b63\u786e\u6027\u548c\u7a33\u5b9a\u6027\u3002\u6839\u636e\u5b9e\u9645\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u540c\u6b65\u65b9\u5f0f\u662f\u7f16\u5199\u9ad8\u6548\u5e76\u53d1\u7a0b\u5e8f\u7684\u5173\u952e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u9501\u5b9a\u6587\u672c\uff0c\u4ee5\u9632\u6b62\u7528\u6237\u7f16\u8f91\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5982\u679c\u60a8\u60f3\u8981\u9501\u5b9a\u6587\u672c\u4ee5\u9632\u6b62\u7528\u6237\u7f16\u8f91\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528GUI\u5e93\uff0c\u5982Tkinter\u3002\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a\u6587\u672c\u6846\u5e76\u5c06\u5176\u8bbe\u7f6e\u4e3a\u53ea\u8bfb\u6a21\u5f0f\uff0c\u53ef\u4ee5\u5b9e\u73b0\u6587\u672c\u9501\u5b9a\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>Text<\/code>\u5c0f\u90e8\u4ef6\u7684<code>config<\/code>\u65b9\u6cd5\uff0c\u5c06<code>state<\/code>\u5c5e\u6027\u8bbe\u7f6e\u4e3a<code>DISABLED<\/code>\uff0c\u4ee5\u963b\u6b62\u7528\u6237\u7f16\u8f91\u6587\u672c\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\uff0c\u5982\u4f55\u5b9e\u73b0\u6587\u672c\u7684\u9ad8\u4eae\u663e\u793a\u529f\u80fd\uff1f<\/strong><br \/>\u8981\u5728Python\u4e2d\u5b9e\u73b0\u6587\u672c\u9ad8\u4eae\u663e\u793a\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528Tkinter\u7684<code>Text<\/code>\u5c0f\u90e8\u4ef6\u3002\u901a\u8fc7\u5b9a\u4e49\u6807\u7b7e\u5e76\u5c06\u5176\u5e94\u7528\u4e8e\u7279\u5b9a\u6587\u672c\u8303\u56f4\uff0c\u53ef\u4ee5\u5b9e\u73b0\u9ad8\u4eae\u6548\u679c\u3002\u4f7f\u7528<code>tag_add<\/code>\u65b9\u6cd5\u6dfb\u52a0\u6807\u7b7e\uff0c\u5e76\u901a\u8fc7<code>tag_config<\/code>\u65b9\u6cd5\u8bbe\u7f6e\u6807\u7b7e\u7684\u80cc\u666f\u989c\u8272\uff0c\u4ece\u800c\u8fbe\u5230\u9ad8\u4eae\u7684\u76ee\u7684\u3002<\/p>\n<p><strong>\u6709\u6ca1\u6709\u65b9\u6cd5\u5728Python\u4e2d\u5bfc\u5165\u548c\u5bfc\u51fa\u9501\u5b9a\u7684\u6587\u672c\uff1f<\/strong><br \/>\u786e\u5b9e\u53ef\u4ee5\u5728Python\u4e2d\u5bfc\u5165\u548c\u5bfc\u51fa\u9501\u5b9a\u7684\u6587\u672c\u3002\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662fTkinter\uff0c\u53ef\u4ee5\u901a\u8fc7\u7b80\u5355\u7684\u6587\u4ef6\u64cd\u4f5c\u6765\u5b9e\u73b0\u3002\u4f7f\u7528<code>open<\/code>\u51fd\u6570\u8bfb\u53d6\u6587\u672c\u6587\u4ef6\u5e76\u5c06\u5176\u5185\u5bb9\u63d2\u5165\u5230\u6587\u672c\u6846\u4e2d\uff0c\u6216\u8005\u5c06\u6587\u672c\u6846\u4e2d\u7684\u5185\u5bb9\u5199\u5165\u5230\u6587\u4ef6\u4e2d\u3002\u786e\u4fdd\u5728\u5bfc\u51fa\u65f6\uff0c\u6587\u672c\u6846\u7684\u72b6\u6001\u4e3a\u6b63\u5e38\uff0c\u4ee5\u4fbf\u80fd\u6b63\u786e\u8bfb\u53d6\u548c\u5199\u5165\u5185\u5bb9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u9501\u5b9a\u6587\u672c\u5bf9\u8c61\u7684\u64cd\u4f5c\u901a\u5e38\u4e0e\u7ebf\u7a0b\u540c\u6b65\u6216\u5e76\u53d1\u7f16\u7a0b\u76f8\u5173\u3002\u4f7f\u7528\u7ebf\u7a0b\u9501\u3001\u907f\u514d\u6570\u636e\u7ade\u4e89\u3001\u786e\u4fdd\u7ebf\u7a0b\u5b89\u5168\u662f\u9501\u5b9a [&hellip;]","protected":false},"author":3,"featured_media":954990,"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\/954984"}],"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=954984"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/954984\/revisions"}],"predecessor-version":[{"id":954993,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/954984\/revisions\/954993"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/954990"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=954984"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=954984"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=954984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}