{"id":937841,"date":"2024-12-26T19:59:38","date_gmt":"2024-12-26T11:59:38","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/937841.html"},"modified":"2024-12-26T19:59:41","modified_gmt":"2024-12-26T11:59:41","slug":"python%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8open","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/937841.html","title":{"rendered":"python\u5982\u4f55\u4f7f\u7528open"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25073528\/91810705-5758-4dfb-b1a4-4186e8424ee1.webp\" alt=\"python\u5982\u4f55\u4f7f\u7528open\" \/><\/p>\n<p><p> <strong>Python\u4e2d\u4f7f\u7528<code>open()<\/code>\u51fd\u6570\u53ef\u4ee5\u6253\u5f00\u6587\u4ef6\u3001\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u3001\u5199\u5165\u6587\u4ef6\u3001\u521b\u5efa\u65b0\u6587\u4ef6\u3002<\/strong>\u5728Python\u4e2d\uff0c<code>open()<\/code>\u51fd\u6570\u662f\u8fdb\u884c\u6587\u4ef6\u64cd\u4f5c\u7684\u57fa\u7840\u65b9\u6cd5\uff0c\u5b83\u80fd\u591f\u4ee5\u4e0d\u540c\u6a21\u5f0f\u6253\u5f00\u6587\u4ef6\uff0c\u4ece\u800c\u5b9e\u73b0\u8bfb\u53d6\u3001\u5199\u5165\u6216\u8ffd\u52a0\u5185\u5bb9\u7b49\u529f\u80fd\u3002\u4f7f\u7528<code>open()<\/code>\u51fd\u6570\u65f6\uff0c\u9700\u8981\u6307\u5b9a\u6587\u4ef6\u8def\u5f84\u548c\u6253\u5f00\u6a21\u5f0f\uff0c\u5176\u4e2d\u5e38\u7528\u7684\u6a21\u5f0f\u5305\u62ec\u8bfb\u53d6\u6a21\u5f0f\uff08<code>&#39;r&#39;<\/code>\uff09\u3001\u5199\u5165\u6a21\u5f0f\uff08<code>&#39;w&#39;<\/code>\uff09\u3001\u8ffd\u52a0\u6a21\u5f0f\uff08<code>&#39;a&#39;<\/code>\uff09\u7b49\u3002\u63a5\u4e0b\u6765\uff0c\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528<code>open()<\/code>\u51fd\u6570\u8bfb\u53d6\u548c\u5199\u5165\u6587\u4ef6\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001<code>open()<\/code>\u51fd\u6570\u7684\u57fa\u672c\u7528\u6cd5<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528<code>open()<\/code>\u51fd\u6570\u65f6\uff0c\u901a\u5e38\u9700\u8981\u4f20\u5165\u4e24\u4e2a\u53c2\u6570\uff1a\u6587\u4ef6\u8def\u5f84\u548c\u6a21\u5f0f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">file = open(&#39;example.txt&#39;, &#39;r&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol>\n<li><strong>\u6587\u4ef6\u8def\u5f84<\/strong>\uff1a\u53ef\u4ee5\u662f\u7edd\u5bf9\u8def\u5f84\u6216\u8005\u76f8\u5bf9\u8def\u5f84\u3002<\/li>\n<li><strong>\u6a21\u5f0f<\/strong>\uff1a\u7528\u4e8e\u6307\u5b9a\u6253\u5f00\u6587\u4ef6\u7684\u65b9\u5f0f\uff0c\u5e38\u7528\u6a21\u5f0f\u5305\u62ec\uff1a\n<ul>\n<li><code>&#39;r&#39;<\/code>\uff1a\u53ea\u8bfb\u6a21\u5f0f\uff0c\u6587\u4ef6\u4e0d\u5b58\u5728\u65f6\u4f1a\u62a5\u9519\u3002<\/li>\n<li><code>&#39;w&#39;<\/code>\uff1a\u5199\u5165\u6a21\u5f0f\uff0c\u4f1a\u8986\u76d6\u5df2\u6709\u6587\u4ef6\uff0c\u6587\u4ef6\u4e0d\u5b58\u5728\u65f6\u4f1a\u521b\u5efa\u65b0\u6587\u4ef6\u3002<\/li>\n<li><code>&#39;a&#39;<\/code>\uff1a\u8ffd\u52a0\u6a21\u5f0f\uff0c\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u5185\u5bb9\uff0c\u6587\u4ef6\u4e0d\u5b58\u5728\u65f6\u4f1a\u521b\u5efa\u65b0\u6587\u4ef6\u3002<\/li>\n<li><code>&#39;b&#39;<\/code>\uff1a\u4ee5\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6253\u5f00\u6587\u4ef6\uff0c\u53ef\u4e0e\u5176\u4ed6\u6a21\u5f0f\u7ec4\u5408\u4f7f\u7528\uff0c\u5982 <code>&#39;rb&#39;<\/code> \u6216 <code>&#39;wb&#39;<\/code>\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><h3>\u4e8c\u3001\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9<\/h3>\n<\/p>\n<p><p>\u5728\u4ee5\u8bfb\u53d6\u6a21\u5f0f\u6253\u5f00\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528<code>read()<\/code>\u8bfb\u53d6\u6574\u4e2a\u6587\u4ef6<\/h4>\n<\/p>\n<p><p><code>read()<\/code>\u65b9\u6cd5\u4f1a\u8bfb\u53d6\u6587\u4ef6\u7684\u5168\u90e8\u5185\u5bb9\uff0c\u5e76\u5c06\u5176\u4f5c\u4e3a\u5b57\u7b26\u4e32\u8fd4\u56de\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    content = file.read()<\/p>\n<p>    print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u6587\u4ef6\u8f83\u5c0f\u7684\u60c5\u51b5\uff0c\u56e0\u4e3a\u5b83\u4f1a\u5c06\u6240\u6709\u5185\u5bb9\u52a0\u8f7d\u5230\u5185\u5b58\u4e2d\u3002<\/p>\n<\/p>\n<p><h4>2. \u4f7f\u7528<code>readline()<\/code>\u9010\u884c\u8bfb\u53d6<\/h4>\n<\/p>\n<p><p><code>readline()<\/code>\u65b9\u6cd5\u6bcf\u6b21\u8bfb\u53d6\u4e00\u884c\u5185\u5bb9\uff0c\u53ef\u4ee5\u5728\u5faa\u73af\u4e2d\u4f7f\u7528\u8bfb\u53d6\u5927\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    line = file.readline()<\/p>\n<p>    while line:<\/p>\n<p>        print(line, end=&#39;&#39;)<\/p>\n<p>        line = file.readline()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u4f7f\u7528<code>readlines()<\/code>\u8bfb\u53d6\u6240\u6709\u884c<\/h4>\n<\/p>\n<p><p><code>readlines()<\/code>\u65b9\u6cd5\u5c06\u6587\u4ef6\u7684\u6bcf\u4e00\u884c\u4f5c\u4e3a\u5217\u8868\u4e2d\u7684\u4e00\u4e2a\u5143\u7d20\u8fd4\u56de\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    lines = file.readlines()<\/p>\n<p>    for line in lines:<\/p>\n<p>        print(line, end=&#39;&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u5199\u5165\u6587\u4ef6\u5185\u5bb9<\/h3>\n<\/p>\n<p><p>\u5728\u4ee5\u5199\u5165\u6216\u8ffd\u52a0\u6a21\u5f0f\u6253\u5f00\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528<code>write()<\/code>\u6216<code>writelines()<\/code>\u65b9\u6cd5\u5199\u5165\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528<code>write()<\/code>\u5199\u5165\u5b57\u7b26\u4e32<\/h4>\n<\/p>\n<p><p><code>write()<\/code>\u65b9\u6cd5\u7528\u4e8e\u5c06\u5b57\u7b26\u4e32\u5199\u5165\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(&#39;Hello, world!\\n&#39;)<\/p>\n<p>    file.write(&#39;Python is great!\\n&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528<code>writelines()<\/code>\u5199\u5165\u5217\u8868<\/h4>\n<\/p>\n<p><p><code>writelines()<\/code>\u65b9\u6cd5\u7528\u4e8e\u5c06\u5b57\u7b26\u4e32\u5217\u8868\u5199\u5165\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">lines = [&#39;Hello, world!\\n&#39;, &#39;Python is great!\\n&#39;]<\/p>\n<p>with open(&#39;example.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.writelines(lines)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u6587\u4ef6\u64cd\u4f5c\u4e2d\u7684\u4e00\u4e9b\u6ce8\u610f\u4e8b\u9879<\/h3>\n<\/p>\n<p><h4>1. \u4f7f\u7528<code>with<\/code>\u8bed\u53e5<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>with<\/code>\u8bed\u53e5\u53ef\u4ee5\u786e\u4fdd\u6587\u4ef6\u5728\u64cd\u4f5c\u5b8c\u6210\u540e\u81ea\u52a8\u5173\u95ed\uff0c\u907f\u514d\u56e0\u5fd8\u8bb0\u5173\u95ed\u6587\u4ef6\u5bfc\u81f4\u7684\u8d44\u6e90\u6cc4\u9732\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    content = file.read()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u5f02\u5e38\u5904\u7406<\/h4>\n<\/p>\n<p><p>\u5728\u8fdb\u884c\u6587\u4ef6\u64cd\u4f5c\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u6587\u4ef6\u4e0d\u5b58\u5728\u6216\u6743\u9650\u4e0d\u8db3\u7b49\u5f02\u5e38\u60c5\u51b5\u3002\u53ef\u4ee5\u4f7f\u7528<code>try-except<\/code>\u7ed3\u6784\u8fdb\u884c\u5f02\u5e38\u5904\u7406\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>        content = file.read()<\/p>\n<p>except FileNotFoundError:<\/p>\n<p>    print(&#39;File not found.&#39;)<\/p>\n<p>except PermissionError:<\/p>\n<p>    print(&#39;Permission denied.&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u4e8c\u8fdb\u5236\u6587\u4ef6\u64cd\u4f5c<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u56fe\u7247\u3001\u97f3\u9891\u7b49\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6253\u5f00\u3002<\/p>\n<\/p>\n<p><h4>1. \u8bfb\u53d6\u4e8c\u8fdb\u5236\u6587\u4ef6<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;image.png&#39;, &#39;rb&#39;) as file:<\/p>\n<p>    data = file.read()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u5199\u5165\u4e8c\u8fdb\u5236\u6587\u4ef6<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;copy_image.png&#39;, &#39;wb&#39;) as file:<\/p>\n<p>    file.write(data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u6587\u4ef6\u5b9a\u4f4d\u4e0e\u6307\u9488\u64cd\u4f5c<\/h3>\n<\/p>\n<p><p>\u6587\u4ef6\u5bf9\u8c61\u63d0\u4f9b\u4e86\u4e00\u4e9b\u65b9\u6cd5\u7528\u4e8e\u79fb\u52a8\u6587\u4ef6\u6307\u9488\u548c\u83b7\u53d6\u5f53\u524d\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528<code>tell()<\/code>\u83b7\u53d6\u5f53\u524d\u6307\u9488\u4f4d\u7f6e<\/h4>\n<\/p>\n<p><p><code>tell()<\/code>\u65b9\u6cd5\u8fd4\u56de\u6587\u4ef6\u6307\u9488\u7684\u5f53\u524d\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    print(file.tell())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528<code>seek()<\/code>\u79fb\u52a8\u6307\u9488<\/h4>\n<\/p>\n<p><p><code>seek()<\/code>\u65b9\u6cd5\u7528\u4e8e\u79fb\u52a8\u6587\u4ef6\u6307\u9488\u5230\u6307\u5b9a\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    file.seek(5)<\/p>\n<p>    print(file.read())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u6587\u672c\u7f16\u7801\u95ee\u9898<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u975eASCII\u6587\u672c\u65f6\uff0c\u53ef\u80fd\u9700\u8981\u6307\u5b9a\u7f16\u7801\u683c\u5f0f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;, encoding=&#39;utf-8&#39;) as file:<\/p>\n<p>    content = file.read()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528Python\u7684<code>open()<\/code>\u51fd\u6570\u53ef\u4ee5\u5b9e\u73b0\u5bf9\u6587\u4ef6\u7684\u7075\u6d3b\u64cd\u4f5c\uff0c\u5305\u62ec\u8bfb\u53d6\u3001\u5199\u5165\u3001\u8ffd\u52a0\u4ee5\u53ca\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5904\u7406\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u5e94\u6839\u636e\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u6587\u4ef6\u6253\u5f00\u6a21\u5f0f\uff0c\u5e76\u6ce8\u610f\u4f7f\u7528<code>with<\/code>\u8bed\u53e5\u786e\u4fdd\u6587\u4ef6\u6b63\u786e\u5173\u95ed\u3002\u6b64\u5916\uff0c\u5728\u5904\u7406\u53ef\u80fd\u51fa\u73b0\u7684\u5f02\u5e38\u60c5\u51b5\u65f6\uff0c\u5408\u7406\u7684\u5f02\u5e38\u5904\u7406\u673a\u5236\u80fd\u591f\u63d0\u9ad8\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u3002\u901a\u8fc7\u5bf9\u6587\u4ef6\u6307\u9488\u7684\u7075\u6d3b\u64cd\u4f5c\uff0c\u53ef\u4ee5\u5b9e\u73b0\u66f4\u9ad8\u7ea7\u7684\u6587\u4ef6\u5904\u7406\u529f\u80fd\uff0c\u4f8b\u5982\u4ece\u7279\u5b9a\u4f4d\u7f6e\u8bfb\u53d6\u6216\u5199\u5165\u5185\u5bb9\u3002\u5728\u5168\u7403\u5316\u7684\u80cc\u666f\u4e0b\uff0c\u6587\u672c\u7f16\u7801\u95ee\u9898\u4e5f\u9700\u8981\u7279\u522b\u6ce8\u610f\uff0c\u4ee5\u786e\u4fdd\u7a0b\u5e8f\u80fd\u591f\u6b63\u786e\u5904\u7406\u4e0d\u540c\u8bed\u8a00\u7684\u6587\u672c\u6570\u636e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u7684open\u51fd\u6570\u6253\u5f00\u6587\u4ef6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u4f7f\u7528open\u51fd\u6570\u53ef\u4ee5\u8f7b\u677e\u6253\u5f00\u6587\u4ef6\u3002\u5176\u57fa\u672c\u8bed\u6cd5\u662f<code>open(filename, mode)<\/code>\uff0c\u5176\u4e2d<code>filename<\/code>\u662f\u8981\u6253\u5f00\u7684\u6587\u4ef6\u540d\uff0c<code>mode<\/code>\u662f\u6253\u5f00\u6587\u4ef6\u7684\u6a21\u5f0f\uff0c\u5982&#39;r&#39;\uff08\u53ea\u8bfb\uff09\u3001&#39;w&#39;\uff08\u5199\u5165\uff09\u3001&#39;a&#39;\uff08\u8ffd\u52a0\uff09\u7b49\u3002\u6253\u5f00\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u8fdb\u884c\u8bfb\u5199\u64cd\u4f5c\uff0c\u5b8c\u6210\u540e\u4e00\u5b9a\u8981\u8bb0\u5f97\u5173\u95ed\u6587\u4ef6\uff0c\u4f7f\u7528<code>file.close()<\/code>\u65b9\u6cd5\u3002<\/p>\n<p><strong>\u53ef\u4ee5\u7528open\u51fd\u6570\u8bfb\u53d6\u54ea\u4e9b\u7c7b\u578b\u7684\u6587\u4ef6\uff1f<\/strong><br \/>open\u51fd\u6570\u4e0d\u4ec5\u53ef\u4ee5\u7528\u4e8e\u6587\u672c\u6587\u4ef6\u7684\u8bfb\u53d6\uff0c\u8fd8\u53ef\u4ee5\u5904\u7406\u5176\u4ed6\u7c7b\u578b\u7684\u6587\u4ef6\uff0c\u5982CSV\u3001JSON\u7b49\u3002\u5bf9\u4e8e\u4e8c\u8fdb\u5236\u6587\u4ef6\uff08\u5982\u56fe\u7247\u548c\u97f3\u9891\uff09\uff0c\u53ef\u4ee5\u4f7f\u7528&#39;b&#39;\u6a21\u5f0f\u6765\u6253\u5f00\uff0c\u4f8b\u5982<code>open(&#39;image.png&#39;, &#39;rb&#39;)<\/code>\u3002\u8fd9\u4f7f\u5f97Python\u5728\u5904\u7406\u5404\u79cd\u6570\u636e\u7c7b\u578b\u65f6\u53d8\u5f97\u975e\u5e38\u7075\u6d3b\u3002<\/p>\n<p><strong>\u5728\u4f7f\u7528open\u65f6\uff0c\u5982\u4f55\u5904\u7406\u6587\u4ef6\u6253\u5f00\u9519\u8bef\uff1f<\/strong><br \/>\u4f7f\u7528open\u51fd\u6570\u65f6\uff0c\u6587\u4ef6\u53ef\u80fd\u4e0d\u5b58\u5728\u6216\u8def\u5f84\u9519\u8bef\uff0c\u8fd9\u65f6\u4f1a\u5f15\u53d1\u5f02\u5e38\u3002\u4e3a\u4e86\u6709\u6548\u5904\u7406\u8fd9\u4e9b\u60c5\u51b5\uff0c\u53ef\u4ee5\u4f7f\u7528try-except\u8bed\u53e5\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u6253\u5f00\u6587\u4ef6\u5e76\u6355\u83b7FileNotFoundError\u5f02\u5e38\uff0c\u4ee5\u4fbf\u63d0\u4f9b\u7528\u6237\u53cb\u597d\u7684\u9519\u8bef\u4fe1\u606f\u3002\u8fd9\u79cd\u65b9\u5f0f\u4e0d\u4ec5\u589e\u5f3a\u4e86\u4ee3\u7801\u7684\u5065\u58ee\u6027\uff0c\u8fd8\u80fd\u63d0\u5347\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4e2d\u4f7f\u7528open()\u51fd\u6570\u53ef\u4ee5\u6253\u5f00\u6587\u4ef6\u3001\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u3001\u5199\u5165\u6587\u4ef6\u3001\u521b\u5efa\u65b0\u6587\u4ef6\u3002\u5728Python\u4e2d\uff0copen [&hellip;]","protected":false},"author":3,"featured_media":937844,"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\/937841"}],"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=937841"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/937841\/revisions"}],"predecessor-version":[{"id":937845,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/937841\/revisions\/937845"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/937844"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=937841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=937841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=937841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}