{"id":1115803,"date":"2025-01-08T18:10:17","date_gmt":"2025-01-08T10:10:17","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1115803.html"},"modified":"2025-01-08T18:10:19","modified_gmt":"2025-01-08T10:10:19","slug":"python%e7%a8%8b%e5%ba%8f%e8%bf%90%e8%a1%8c%e6%97%b6%e5%a6%82%e4%bd%95%e6%8e%a5%e5%8f%97%e6%8c%87%e4%bb%a4%e9%80%80%e5%87%ba","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1115803.html","title":{"rendered":"python\u7a0b\u5e8f\u8fd0\u884c\u65f6\u5982\u4f55\u63a5\u53d7\u6307\u4ee4\u9000\u51fa"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25080410\/b09bc368-880b-46e1-b514-1712eee27d98.webp\" alt=\"python\u7a0b\u5e8f\u8fd0\u884c\u65f6\u5982\u4f55\u63a5\u53d7\u6307\u4ee4\u9000\u51fa\" \/><\/p>\n<p><p> \u5728Python\u7a0b\u5e8f\u8fd0\u884c\u65f6\uff0c\u63a5\u53d7\u6307\u4ee4\u9000\u51fa\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c<strong>\u53ef\u4ee5\u4f7f\u7528\u952e\u76d8\u4e2d\u65ad\uff08\u5982Ctrl+C\uff09\u3001\u76d1\u542c\u7279\u5b9a\u7684\u952e\u76d8\u8f93\u5165\u3001\u4f7f\u7528\u4fe1\u53f7\u5904\u7406\u673a\u5236\u3001\u901a\u8fc7\u7f51\u7edc\u6216\u6587\u4ef6\u7cfb\u7edf\u76d1\u63a7\u9000\u51fa\u6307\u4ee4<\/strong>\u7b49\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u4f7f\u7528\u4fe1\u53f7\u5904\u7406\u673a\u5236\u662f\u4e00\u79cd\u975e\u5e38\u6709\u6548\u7684\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528\u4fe1\u53f7\u5904\u7406\u673a\u5236\uff0c\u53ef\u4ee5\u5728\u7a0b\u5e8f\u6267\u884c\u8fc7\u7a0b\u4e2d\u76d1\u542c\u7cfb\u7edf\u4fe1\u53f7\uff08\u5982SIGINT\u3001SIGTERM\uff09\uff0c\u5e76\u5728\u63a5\u6536\u5230\u4fe1\u53f7\u65f6\u8fdb\u884c\u76f8\u5e94\u7684\u5904\u7406\u64cd\u4f5c\uff0c\u8fd9\u79cd\u65b9\u6cd5\u5728\u9700\u8981\u4f18\u96c5\u9000\u51fa\u5e76\u91ca\u653e\u8d44\u6e90\u7684\u573a\u666f\u4e2d\u975e\u5e38\u6709\u7528\u3002<\/strong><\/p>\n<\/p>\n<hr>\n<h2><strong>\u4e00\u3001\u952e\u76d8\u4e2d\u65ad\uff08\u5982Ctrl+C\uff09<\/strong><\/h2>\n<p><p>\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u952e\u76d8\u4e2d\u65ad\u662f\u6700\u76f4\u63a5\u548c\u7b80\u5355\u7684\u9000\u51fa\u65b9\u5f0f\u3002\u5f53\u7528\u6237\u5728\u7ec8\u7aef\u8fd0\u884cPython\u7a0b\u5e8f\u65f6\uff0c\u6309\u4e0bCtrl+C\u7ec4\u5408\u952e\u53ef\u4ee5\u89e6\u53d1KeyboardInterrupt\u5f02\u5e38\uff0c\u8fdb\u800c\u7ec8\u6b62\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    while True:<\/p>\n<p>        print(&quot;Running... Press Ctrl+C to exit.&quot;)<\/p>\n<p>        time.sleep(1)<\/p>\n<p>except KeyboardInterrupt:<\/p>\n<p>    print(&quot;KeyboardInterrupt caught. Exiting program.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u7a0b\u5e8f\u4f1a\u4e0d\u65ad\u6253\u5370\u201cRunning&#8230; Press Ctrl+C to exit.\u201d\u5e76\u5728\u6536\u5230Ctrl+C\u4fe1\u53f7\u65f6\u6355\u83b7KeyboardInterrupt\u5f02\u5e38\uff0c\u7136\u540e\u6253\u5370\u6d88\u606f\u5e76\u9000\u51fa\u3002<\/p>\n<\/p>\n<h2><strong>\u4e8c\u3001\u76d1\u542c\u7279\u5b9a\u7684\u952e\u76d8\u8f93\u5165<\/strong><\/h2>\n<p><p>\u53e6\u4e00\u79cd\u9000\u51fa\u7a0b\u5e8f\u7684\u65b9\u5f0f\u662f\u76d1\u542c\u7279\u5b9a\u7684\u952e\u76d8\u8f93\u5165\u3002\u4f8b\u5982\uff0c\u7528\u6237\u53ef\u4ee5\u8f93\u5165\u7279\u5b9a\u7684\u5b57\u7b26\u6216\u5b57\u7b26\u4e32\u6765\u9000\u51fa\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">while True:<\/p>\n<p>    user_input = input(&quot;Enter &#39;exit&#39; to quit: &quot;)<\/p>\n<p>    if user_input.strip().lower() == &#39;exit&#39;:<\/p>\n<p>        print(&quot;Exiting program.&quot;)<\/p>\n<p>        break<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u7a0b\u5e8f\u4f1a\u4e0d\u65ad\u63d0\u793a\u7528\u6237\u8f93\u5165\uff0c\u5e76\u5728\u7528\u6237\u8f93\u5165\u201cexit\u201d\u65f6\u9000\u51fa\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<h2><strong>\u4e09\u3001\u4f7f\u7528\u4fe1\u53f7\u5904\u7406\u673a\u5236<\/strong><\/h2>\n<p><p>Python\u7684<code>signal<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u5904\u7406\u7cfb\u7edf\u4fe1\u53f7\u7684\u80fd\u529b\u3002\u901a\u8fc7\u8fd9\u4e2a\u6a21\u5757\uff0c\u53ef\u4ee5\u6355\u83b7\u5e76\u5904\u7406\u4e0d\u540c\u7684\u7cfb\u7edf\u4fe1\u53f7\uff0c\u5982SIGINT\uff08\u901a\u5e38\u7531Ctrl+C\u89e6\u53d1\uff09\u3001SIGTERM\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import signal<\/p>\n<p>import time<\/p>\n<p>def handle_signal(signum, frame):<\/p>\n<p>    print(f&quot;Signal {signum} received. Exiting program.&quot;)<\/p>\n<p>    exit(0)<\/p>\n<p>signal.signal(signal.SIGINT, handle_signal)<\/p>\n<p>signal.signal(signal.SIGTERM, handle_signal)<\/p>\n<p>print(&quot;Program running... Press Ctrl+C to exit or send SIGTERM signal.&quot;)<\/p>\n<p>while True:<\/p>\n<p>    time.sleep(1)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u7a0b\u5e8f\u4f1a\u6355\u83b7SIGINT\u548cSIGTERM\u4fe1\u53f7\uff0c\u5e76\u5728\u63a5\u6536\u5230\u4fe1\u53f7\u65f6\u8c03\u7528<code>handle_signal<\/code>\u51fd\u6570\u8fdb\u884c\u5904\u7406\u3002<\/p>\n<\/p>\n<h2><strong>\u56db\u3001\u901a\u8fc7\u7f51\u7edc\u6216\u6587\u4ef6\u7cfb\u7edf\u76d1\u63a7\u9000\u51fa\u6307\u4ee4<\/strong><\/h2>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u7a0b\u5e8f\u53ef\u80fd\u9700\u8981\u901a\u8fc7\u7f51\u7edc\u6216\u6587\u4ef6\u7cfb\u7edf\u76d1\u63a7\u9000\u51fa\u6307\u4ee4\u3002\u4f8b\u5982\uff0c\u670d\u52a1\u5668\u7a0b\u5e8f\u53ef\u4ee5\u76d1\u542c\u7279\u5b9a\u7aef\u53e3\u7684\u7f51\u7edc\u8fde\u63a5\u8bf7\u6c42\uff0c\u5e76\u5728\u63a5\u6536\u5230\u7279\u5b9a\u6307\u4ee4\u65f6\u9000\u51fa\uff1b\u6216\u8005\u901a\u8fc7\u76d1\u63a7\u7279\u5b9a\u6587\u4ef6\u7684\u5b58\u5728\u4e0e\u5426\u6765\u51b3\u5b9a\u662f\u5426\u9000\u51fa\u3002<\/p>\n<\/p>\n<p><h2>\u7f51\u7edc\u76d1\u542c\u793a\u4f8b<\/h2>\n<\/p>\n<p><pre><code class=\"language-python\">import socket<\/p>\n<p>import threading<\/p>\n<p>def listen_for_exit_command(port=12345):<\/p>\n<p>    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:<\/p>\n<p>        s.bind((&#39;localhost&#39;, port))<\/p>\n<p>        s.listen(1)<\/p>\n<p>        print(f&quot;Listening for exit command on port {port}...&quot;)<\/p>\n<p>        conn, addr = s.accept()<\/p>\n<p>        with conn:<\/p>\n<p>            print(f&quot;Exit command received from {addr}. Exiting program.&quot;)<\/p>\n<p>            exit(0)<\/p>\n<p>exit_thread = threading.Thread(target=listen_for_exit_command)<\/p>\n<p>exit_thread.start()<\/p>\n<p>print(&quot;Program running... Connect to port 12345 and send any data to exit.&quot;)<\/p>\n<p>while True:<\/p>\n<p>    time.sleep(1)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u7a0b\u5e8f\u4f1a\u5728\u5355\u72ec\u7684\u7ebf\u7a0b\u4e2d\u76d1\u542c12345\u7aef\u53e3\u7684\u8fde\u63a5\u8bf7\u6c42\uff0c\u5e76\u5728\u63a5\u6536\u5230\u8bf7\u6c42\u65f6\u9000\u51fa\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><h2>\u6587\u4ef6\u76d1\u63a7\u793a\u4f8b<\/h2>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>import time<\/p>\n<p>exit_file_path = &#39;\/tmp\/exit_program&#39;<\/p>\n<p>print(f&quot;Program running... Create the file &#39;{exit_file_path}&#39; to exit.&quot;)<\/p>\n<p>while True:<\/p>\n<p>    if os.path.exists(exit_file_path):<\/p>\n<p>        print(f&quot;Exit file &#39;{exit_file_path}&#39; detected. Exiting program.&quot;)<\/p>\n<p>        os.remove(exit_file_path)<\/p>\n<p>        break<\/p>\n<p>    time.sleep(1)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u7a0b\u5e8f\u4f1a\u4e0d\u65ad\u68c0\u67e5\u7279\u5b9a\u6587\u4ef6\u7684\u5b58\u5728\u4e0e\u5426\uff0c\u5e76\u5728\u68c0\u6d4b\u5230\u6587\u4ef6\u5b58\u5728\u65f6\u9000\u51fa\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<h2><strong>\u4e94\u3001\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u7684\u7efc\u5408\u5904\u7406<\/strong><\/h2>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u6765\u5904\u7406\u7a0b\u5e8f\u7684\u9000\u51fa\u6307\u4ee4\uff0c\u4ee5\u6ee1\u8db3\u4e0d\u540c\u573a\u666f\u7684\u9700\u6c42\u3002\u4f8b\u5982\uff0c\u65e2\u9700\u8981\u5904\u7406\u952e\u76d8\u4e2d\u65ad\uff0c\u53c8\u9700\u8981\u76d1\u542c\u7279\u5b9a\u7684\u7f51\u7edc\u6307\u4ee4\u548c\u6587\u4ef6\u7cfb\u7edf\u6307\u4ee4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import signal<\/p>\n<p>import socket<\/p>\n<p>import threading<\/p>\n<p>import os<\/p>\n<p>import time<\/p>\n<p>def handle_signal(signum, frame):<\/p>\n<p>    print(f&quot;Signal {signum} received. Exiting program.&quot;)<\/p>\n<p>    exit(0)<\/p>\n<p>def listen_for_exit_command(port=12345):<\/p>\n<p>    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:<\/p>\n<p>        s.bind((&#39;localhost&#39;, port))<\/p>\n<p>        s.listen(1)<\/p>\n<p>        print(f&quot;Listening for exit command on port {port}...&quot;)<\/p>\n<p>        conn, addr = s.accept()<\/p>\n<p>        with conn:<\/p>\n<p>            print(f&quot;Exit command received from {addr}. Exiting program.&quot;)<\/p>\n<p>            exit(0)<\/p>\n<p>def monitor_exit_file(exit_file_path=&#39;\/tmp\/exit_program&#39;):<\/p>\n<p>    while True:<\/p>\n<p>        if os.path.exists(exit_file_path):<\/p>\n<p>            print(f&quot;Exit file &#39;{exit_file_path}&#39; detected. Exiting program.&quot;)<\/p>\n<p>            os.remove(exit_file_path)<\/p>\n<p>            exit(0)<\/p>\n<p>        time.sleep(1)<\/p>\n<p>signal.signal(signal.SIGINT, handle_signal)<\/p>\n<p>signal.signal(signal.SIGTERM, handle_signal)<\/p>\n<p>exit_thread = threading.Thread(target=listen_for_exit_command)<\/p>\n<p>exit_thread.start()<\/p>\n<p>file_monitor_thread = threading.Thread(target=monitor_exit_file)<\/p>\n<p>file_monitor_thread.start()<\/p>\n<p>print(&quot;Program running... Press Ctrl+C, connect to port 12345, or create the file &#39;\/tmp\/exit_program&#39; to exit.&quot;)<\/p>\n<p>while True:<\/p>\n<p>    time.sleep(1)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u7efc\u5408\u793a\u4f8b\u4e2d\uff0c\u7a0b\u5e8f\u4f1a\u540c\u65f6\u5904\u7406\u952e\u76d8\u4e2d\u65ad\u3001\u7f51\u7edc\u6307\u4ee4\u548c\u6587\u4ef6\u7cfb\u7edf\u6307\u4ee4\uff0c\u786e\u4fdd\u5728\u591a\u79cd\u60c5\u51b5\u4e0b\u90fd\u80fd\u4f18\u96c5\u5730\u9000\u51fa\u3002<\/p>\n<\/p>\n<h2><strong>\u603b\u7ed3<\/strong><\/h2>\n<p><p>Python\u7a0b\u5e8f\u5728\u8fd0\u884c\u65f6\u63a5\u53d7\u6307\u4ee4\u9000\u51fa\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u9002\u5408\u7684\u65b9\u6cd5\u3002<strong>\u952e\u76d8\u4e2d\u65ad\u3001\u76d1\u542c\u7279\u5b9a\u7684\u952e\u76d8\u8f93\u5165\u3001\u4f7f\u7528\u4fe1\u53f7\u5904\u7406\u673a\u5236\u3001\u901a\u8fc7\u7f51\u7edc\u6216\u6587\u4ef6\u7cfb\u7edf\u76d1\u63a7\u9000\u51fa\u6307\u4ee4<\/strong>\u90fd\u662f\u5e38\u89c1\u7684\u5b9e\u73b0\u65b9\u5f0f\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u8fdb\u884c\u7efc\u5408\u5904\u7406\uff0c\u4ee5\u5b9e\u73b0\u66f4\u7075\u6d3b\u548c\u53ef\u9760\u7684\u9000\u51fa\u673a\u5236\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u7a0b\u5e8f\u4e2d\u5b9e\u73b0\u5b89\u5168\u9000\u51fa\u6307\u4ee4\uff1f<\/strong><br \/>\u5728Python\u7a0b\u5e8f\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u6355\u6349\u7279\u5b9a\u7684\u8f93\u5165\u6307\u4ee4\u6765\u5b9e\u73b0\u5b89\u5168\u9000\u51fa\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e2a\u5faa\u73af\u76d1\u542c\u7528\u6237\u8f93\u5165\uff0c\u5f53\u7528\u6237\u8f93\u5165\u201cexit\u201d\u6216\u201cquit\u201d\u65f6\uff0c\u7a0b\u5e8f\u53ef\u4ee5\u4f18\u96c5\u5730\u5173\u95ed\u3002\u53ef\u4ee5\u4f7f\u7528<code>input()<\/code>\u51fd\u6570\u6765\u63a5\u6536\u7528\u6237\u6307\u4ee4\uff0c\u5e76\u7ed3\u5408<code>break<\/code>\u8bed\u53e5\u8df3\u51fa\u5faa\u73af\u3002<\/p>\n<p><strong>\u5728Python\u7a0b\u5e8f\u4e2d\uff0c\u5982\u4f55\u5904\u7406\u5f02\u5e38\u4ee5\u786e\u4fdd\u7a0b\u5e8f\u6b63\u5e38\u9000\u51fa\uff1f<\/strong><br \/>\u901a\u8fc7\u4f7f\u7528<code>try...except<\/code>\u7ed3\u6784\uff0c\u53ef\u4ee5\u6355\u6349\u5e76\u5904\u7406\u8fd0\u884c\u65f6\u9519\u8bef\uff0c\u786e\u4fdd\u7a0b\u5e8f\u5728\u9047\u5230\u5f02\u5e38\u60c5\u51b5\u65f6\u53ef\u4ee5\u6b63\u5e38\u9000\u51fa\u3002\u8bbe\u8ba1\u4e00\u4e2a\u5408\u9002\u7684\u5f02\u5e38\u5904\u7406\u673a\u5236\uff0c\u80fd\u591f\u8ba9\u7528\u6237\u5728\u7a0b\u5e8f\u51fa\u9519\u65f6\u83b7\u5f97\u53cd\u9988\uff0c\u5e76\u9009\u62e9\u662f\u5426\u7ee7\u7eed\u6216\u9000\u51fa\u3002<\/p>\n<p><strong>\u53ef\u4ee5\u4f7f\u7528\u54ea\u4e9b\u5e93\u6765\u63d0\u5347Python\u7a0b\u5e8f\u7684\u7528\u6237\u4ea4\u4e92\u4f53\u9a8c\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528<code>curses<\/code>\u5e93\u6765\u521b\u5efa\u66f4\u590d\u6742\u7684\u7528\u6237\u754c\u9762\uff0c\u6216\u8005\u4f7f\u7528<code>argparse<\/code>\u5e93\u6765\u89e3\u6790\u547d\u4ee4\u884c\u53c2\u6570\u3002\u8fd9\u6837\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8f93\u5165\u4e0d\u540c\u7684\u53c2\u6570\u6765\u63a7\u5236\u7a0b\u5e8f\u7684\u884c\u4e3a\uff0c\u5305\u62ec\u9000\u51fa\u6307\u4ee4\uff0c\u4ece\u800c\u63d0\u5347\u6574\u4f53\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u7a0b\u5e8f\u8fd0\u884c\u65f6\uff0c\u63a5\u53d7\u6307\u4ee4\u9000\u51fa\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u53ef\u4ee5\u4f7f\u7528\u952e\u76d8\u4e2d\u65ad\uff08\u5982Ctrl+C\uff09\u3001\u76d1\u542c\u7279\u5b9a\u7684\u952e\u76d8\u8f93\u5165\u3001\u4f7f [&hellip;]","protected":false},"author":3,"featured_media":1115810,"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\/1115803"}],"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=1115803"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1115803\/revisions"}],"predecessor-version":[{"id":1115811,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1115803\/revisions\/1115811"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1115810"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1115803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1115803"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1115803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}