{"id":1105770,"date":"2025-01-08T16:34:04","date_gmt":"2025-01-08T08:34:04","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1105770.html"},"modified":"2025-01-08T16:34:06","modified_gmt":"2025-01-08T08:34:06","slug":"python%e5%a6%82%e4%bd%95%e6%89%93%e5%bc%80%e5%8f%a6%e4%b8%80%e4%b8%aa%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1105770.html","title":{"rendered":"python\u5982\u4f55\u6253\u5f00\u53e6\u4e00\u4e2a\u7a0b\u5e8f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25070522\/079c9141-d9fd-4672-818d-0c7a36268f3c.webp\" alt=\"python\u5982\u4f55\u6253\u5f00\u53e6\u4e00\u4e2a\u7a0b\u5e8f\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u6253\u5f00\u53e6\u4e00\u4e2a\u7a0b\u5e8f\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\uff1a\u4f7f\u7528<code>os.system()<\/code>\u3001<code>subprocess.run()<\/code>\u3001<code>subprocess.Popen()<\/code>\u7b49\u3002<\/strong>\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u51e0\u79cd\u65b9\u6cd5\uff0c\u5e76\u91cd\u70b9\u63cf\u8ff0<code>subprocess<\/code>\u6a21\u5757\u7684\u4f7f\u7528\u7ec6\u8282\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528<code>os.system()<\/code><\/p>\n<\/p>\n<p><p><code>os.system()<\/code>\u662fPython\u4e2d\u6700\u7b80\u5355\u7684\u4e00\u79cd\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u6267\u884c\u4e00\u4e2a\u7cfb\u7edf\u547d\u4ee4\u3002\u4f7f\u7528\u65f6\uff0c\u4f60\u53ea\u9700\u8981\u5c06\u7cfb\u7edf\u547d\u4ee4\u4f5c\u4e3a\u5b57\u7b26\u4e32\u4f20\u5165\u5373\u53ef\u3002\u867d\u7136\u7b80\u5355\u6613\u7528\uff0c\u4f46\u5b83\u7684\u529f\u80fd\u6709\u9650\uff0c\u65e0\u6cd5\u6355\u83b7\u5b50\u8fdb\u7a0b\u7684\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>os.system(&#39;notepad.exe&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528<code>subprocess.run()<\/code><\/p>\n<\/p>\n<p><p><code>subprocess.run()<\/code>\u662fPython 3.5\u4e2d\u5f15\u5165\u7684\u4e00\u4e2a\u51fd\u6570\uff0c\u5b83\u80fd\u591f\u66f4\u597d\u5730\u63a7\u5236\u5b50\u8fdb\u7a0b\uff0c\u5141\u8bb8\u4f60\u83b7\u53d6\u8f93\u51fa\u3001\u9519\u8bef\u4fe1\u606f\u548c\u8fd4\u56de\u7801\u3002\u5b83\u662f\u6267\u884c\u7cfb\u7edf\u547d\u4ee4\u7684\u63a8\u8350\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<p>subprocess.run([&#39;notepad.exe&#39;])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c<code>subprocess.run()<\/code>\u63a5\u53d7\u4e00\u4e2a\u5217\u8868\u4f5c\u4e3a\u53c2\u6570\uff0c\u5217\u8868\u7684\u7b2c\u4e00\u4e2a\u5143\u7d20\u662f\u7a0b\u5e8f\u540d\u79f0\uff0c\u540e\u7eed\u5143\u7d20\u662f\u4f20\u9012\u7ed9\u7a0b\u5e8f\u7684\u53c2\u6570\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u66f4\u590d\u6742\u7684\u793a\u4f8b\uff0c\u5c55\u793a\u5982\u4f55\u83b7\u53d6\u5b50\u8fdb\u7a0b\u7684\u8f93\u51fa\u548c\u9519\u8bef\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<p>result = subprocess.run([&#39;ping&#39;, &#39;www.google.com&#39;], capture_output=True, text=True)<\/p>\n<p>print(&quot;STDOUT:&quot;, result.stdout)<\/p>\n<p>print(&quot;STDERR:&quot;, result.stderr)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528<code>subprocess.Popen()<\/code><\/p>\n<\/p>\n<p><p><code>subprocess.Popen()<\/code>\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7ea7\u7684\u63a5\u53e3\uff0c\u5141\u8bb8\u4f60\u66f4\u7075\u6d3b\u5730\u63a7\u5236\u5b50\u8fdb\u7a0b\u3002\u5b83\u4e0d\u4ec5\u53ef\u4ee5\u6267\u884c\u7cfb\u7edf\u547d\u4ee4\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7\u7ba1\u9053\u4f20\u8f93\u6570\u636e\uff0c\u5141\u8bb8\u4f60\u4e0e\u5b50\u8fdb\u7a0b\u8fdb\u884c\u4ea4\u4e92\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<p>p = subprocess.Popen([&#39;notepad.exe&#39;])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>subprocess.Popen()<\/code>\u4f1a\u7acb\u5373\u8fd4\u56de\u4e00\u4e2a<code>Popen<\/code>\u5bf9\u8c61\uff0c\u800c\u4e0d\u4f1a\u7b49\u5f85\u5b50\u8fdb\u7a0b\u5b8c\u6210\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528<code>Popen<\/code>\u5bf9\u8c61\u7684\u65b9\u6cd5\u4e0e\u5b50\u8fdb\u7a0b\u8fdb\u884c\u4ea4\u4e92\uff0c\u6bd4\u5982\u83b7\u53d6\u5b50\u8fdb\u7a0b\u7684\u8f93\u51fa\u3001\u53d1\u9001\u6570\u636e\u5230\u5b50\u8fdb\u7a0b\u3001\u7b49\u5f85\u5b50\u8fdb\u7a0b\u5b8c\u6210\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<h2><strong>\u542f\u52a8\u4e00\u4e2a\u5b50\u8fdb\u7a0b<\/strong><\/h2>\n<p>p = subprocess.Popen([&#39;ping&#39;, &#39;www.google.com&#39;], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)<\/p>\n<h2><strong>\u8bfb\u53d6\u5b50\u8fdb\u7a0b\u7684\u8f93\u51fa<\/strong><\/h2>\n<p>stdout, stderr = p.communicate()<\/p>\n<p>print(&quot;STDOUT:&quot;, stdout)<\/p>\n<p>print(&quot;STDERR:&quot;, stderr)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u6355\u83b7\u548c\u5904\u7406\u5b50\u8fdb\u7a0b\u7684\u8f93\u51fa\u548c\u9519\u8bef<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6211\u4eec\u7ecf\u5e38\u9700\u8981\u6355\u83b7\u5b50\u8fdb\u7a0b\u7684\u8f93\u51fa\u548c\u9519\u8bef\u4fe1\u606f\uff0c\u5e76\u6839\u636e\u8fd9\u4e9b\u4fe1\u606f\u8fdb\u884c\u8fdb\u4e00\u6b65\u5904\u7406\u3002\u4e3a\u4e86\u5b9e\u73b0\u8fd9\u4e00\u70b9\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>subprocess.run()<\/code>\u7684<code>capture_output<\/code>\u53c2\u6570\u6216<code>subprocess.Popen()<\/code>\u7684<code>stdout<\/code>\u548c<code>stderr<\/code>\u53c2\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<h2><strong>\u4f7f\u7528 subprocess.run \u6355\u83b7\u8f93\u51fa\u548c\u9519\u8bef\u4fe1\u606f<\/strong><\/h2>\n<p>result = subprocess.run([&#39;ping&#39;, &#39;www.google.com&#39;], capture_output=True, text=True)<\/p>\n<p>if result.returncode == 0:<\/p>\n<p>    print(&quot;Command succeeded with output:&quot;, result.stdout)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;Command f<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>led with error:&quot;, result.stderr)<\/p>\n<h2><strong>\u4f7f\u7528 subprocess.Popen \u6355\u83b7\u8f93\u51fa\u548c\u9519\u8bef\u4fe1\u606f<\/strong><\/h2>\n<p>p = subprocess.Popen([&#39;ping&#39;, &#39;www.google.com&#39;], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)<\/p>\n<p>stdout, stderr = p.communicate()<\/p>\n<p>if p.returncode == 0:<\/p>\n<p>    print(&quot;Command succeeded with output:&quot;, stdout)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;Command failed with error:&quot;, stderr)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u5904\u7406\u5b50\u8fdb\u7a0b\u7684\u8f93\u5165<\/p>\n<\/p>\n<p><p>\u6709\u65f6\uff0c\u6211\u4eec\u9700\u8981\u5411\u5b50\u8fdb\u7a0b\u63d0\u4f9b\u8f93\u5165\u6570\u636e\u3002\u4e3a\u6b64\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>subprocess.run()<\/code>\u7684<code>input<\/code>\u53c2\u6570\u6216<code>subprocess.Popen()<\/code>\u7684<code>stdin<\/code>\u53c2\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<h2><strong>\u4f7f\u7528 subprocess.run \u63d0\u4f9b\u8f93\u5165\u6570\u636e<\/strong><\/h2>\n<p>result = subprocess.run([&#39;python&#39;, &#39;-c&#39;, &#39;print(input())&#39;], input=&#39;Hello, World!&#39;, capture_output=True, text=True)<\/p>\n<p>print(&quot;Output:&quot;, result.stdout)<\/p>\n<h2><strong>\u4f7f\u7528 subprocess.Popen \u63d0\u4f9b\u8f93\u5165\u6570\u636e<\/strong><\/h2>\n<p>p = subprocess.Popen([&#39;python&#39;, &#39;-c&#39;, &#39;print(input())&#39;], stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True)<\/p>\n<p>stdout, stderr = p.communicate(input=&#39;Hello, World!&#39;)<\/p>\n<p>print(&quot;Output:&quot;, stdout)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516d\u3001\u4f7f\u7528\u7ba1\u9053\u4f20\u8f93\u6570\u636e<\/p>\n<\/p>\n<p><p><code>subprocess.Popen()<\/code>\u5141\u8bb8\u6211\u4eec\u521b\u5efa\u7ba1\u9053\uff0c\u4ee5\u4fbf\u5728\u591a\u4e2a\u5b50\u8fdb\u7a0b\u4e4b\u95f4\u4f20\u8f93\u6570\u636e\u3002\u8fd9\u5728\u9700\u8981\u5c06\u4e00\u4e2a\u5b50\u8fdb\u7a0b\u7684\u8f93\u51fa\u4f5c\u4e3a\u53e6\u4e00\u4e2a\u5b50\u8fdb\u7a0b\u7684\u8f93\u5165\u65f6\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<h2><strong>\u521b\u5efa\u7b2c\u4e00\u4e2a\u5b50\u8fdb\u7a0b\uff0c\u5c06\u8f93\u51fa\u91cd\u5b9a\u5411\u5230\u7ba1\u9053<\/strong><\/h2>\n<p>p1 = subprocess.Popen([&#39;echo&#39;, &#39;Hello, World!&#39;], stdout=subprocess.PIPE, text=True)<\/p>\n<h2><strong>\u521b\u5efa\u7b2c\u4e8c\u4e2a\u5b50\u8fdb\u7a0b\uff0c\u5c06\u8f93\u5165\u91cd\u5b9a\u5411\u5230\u7ba1\u9053<\/strong><\/h2>\n<p>p2 = subprocess.Popen([&#39;grep&#39;, &#39;World&#39;], stdin=p1.stdout, stdout=subprocess.PIPE, text=True)<\/p>\n<h2><strong>\u5173\u95ed\u7b2c\u4e00\u4e2a\u5b50\u8fdb\u7a0b\u7684\u8f93\u51fa\u7ba1\u9053<\/strong><\/h2>\n<p>p1.stdout.close()<\/p>\n<h2><strong>\u83b7\u53d6\u7b2c\u4e8c\u4e2a\u5b50\u8fdb\u7a0b\u7684\u8f93\u51fa<\/strong><\/h2>\n<p>output = p2.communicate()[0]<\/p>\n<p>print(&quot;Output:&quot;, output)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e03\u3001\u5904\u7406\u5b50\u8fdb\u7a0b\u7684\u8d85\u65f6<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u5b50\u8fdb\u7a0b\u53ef\u80fd\u4f1a\u957f\u65f6\u95f4\u8fd0\u884c\u6216\u9677\u5165\u6b7b\u5faa\u73af\u3002\u4e3a\u4e86\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>subprocess.run()<\/code>\u7684<code>timeout<\/code>\u53c2\u6570\u6216<code>Popen.communicate()<\/code>\u7684<code>timeout<\/code>\u53c2\u6570\u6765\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<h2><strong>\u4f7f\u7528 subprocess.run \u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4<\/strong><\/h2>\n<p>try:<\/p>\n<p>    result = subprocess.run([&#39;ping&#39;, &#39;-n&#39;, &#39;10&#39;, &#39;www.google.com&#39;], capture_output=True, text=True, timeout=5)<\/p>\n<p>    print(&quot;Output:&quot;, result.stdout)<\/p>\n<p>except subprocess.TimeoutExpired:<\/p>\n<p>    print(&quot;Command timed out&quot;)<\/p>\n<h2><strong>\u4f7f\u7528 Popen.communicate \u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4<\/strong><\/h2>\n<p>p = subprocess.Popen([&#39;ping&#39;, &#39;-n&#39;, &#39;10&#39;, &#39;www.google.com&#39;], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)<\/p>\n<p>try:<\/p>\n<p>    stdout, stderr = p.communicate(timeout=5)<\/p>\n<p>    print(&quot;Output:&quot;, stdout)<\/p>\n<p>except subprocess.TimeoutExpired:<\/p>\n<p>    p.kill()<\/p>\n<p>    stdout, stderr = p.communicate()<\/p>\n<p>    print(&quot;Command timed out&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516b\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u51e0\u79cd\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u5728Python\u4e2d\u8f7b\u677e\u5730\u6253\u5f00\u5e76\u63a7\u5236\u53e6\u4e00\u4e2a\u7a0b\u5e8f\u3002<strong>\u4f7f\u7528<code>subprocess.run()<\/code>\u548c<code>subprocess.Popen()<\/code>\u53ef\u4ee5\u63d0\u4f9b\u66f4\u5f3a\u5927\u7684\u529f\u80fd\u548c\u66f4\u7ec6\u7c92\u5ea6\u7684\u63a7\u5236<\/strong>\uff0c\u4f7f\u6211\u4eec\u80fd\u591f\u6355\u83b7\u5b50\u8fdb\u7a0b\u7684\u8f93\u51fa\u548c\u9519\u8bef\u4fe1\u606f\u3001\u5904\u7406\u5b50\u8fdb\u7a0b\u7684\u8f93\u5165\u3001\u901a\u8fc7\u7ba1\u9053\u4f20\u8f93\u6570\u636e\u3001\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4\u7b49\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u548c\u53c2\u6570\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u6ee1\u8db3\u6211\u4eec\u7684\u9700\u6c42\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u6253\u5f00\u5916\u90e8\u7a0b\u5e8f\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>subprocess<\/code>\u6a21\u5757\u6765\u542f\u52a8\u5916\u90e8\u7a0b\u5e8f\u3002\u8fd9\u4e2a\u6a21\u5757\u5141\u8bb8\u4f60\u521b\u5efa\u65b0\u7684\u8fdb\u7a0b\u3001\u8fde\u63a5\u5230\u5b83\u4eec\u7684\u8f93\u5165\/\u8f93\u51fa\/\u9519\u8bef\u7ba1\u9053\uff0c\u5e76\u83b7\u5f97\u8fd4\u56de\u7801\u3002\u901a\u8fc7<code>subprocess.run()<\/code>\u6216<code>subprocess.Popen()<\/code>\u7b49\u65b9\u6cd5\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u6253\u5f00\u548c\u7ba1\u7406\u5916\u90e8\u7a0b\u5e8f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u4ee3\u7801\uff1a  <\/p>\n<pre><code class=\"language-python\">import subprocess\n\nsubprocess.run([&quot;notepad.exe&quot;])  # \u6253\u5f00\u8bb0\u4e8b\u672c\u7a0b\u5e8f\n<\/code><\/pre>\n<p><strong>\u4f7f\u7528Python\u6253\u5f00\u7a0b\u5e8f\u65f6\u6709\u54ea\u4e9b\u6ce8\u610f\u4e8b\u9879\uff1f<\/strong><br \/>\u5728\u4f7f\u7528Python\u6253\u5f00\u5916\u90e8\u7a0b\u5e8f\u65f6\uff0c\u786e\u4fdd\u5df2\u6b63\u786e\u5b89\u88c5\u8be5\u7a0b\u5e8f\uff0c\u5e76\u63d0\u4f9b\u4e86\u6b63\u786e\u7684\u8def\u5f84\u3002\u5982\u679c\u7a0b\u5e8f\u4e0d\u5728\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b8c\u6574\u8def\u5f84\u6765\u6307\u5b9a\u7a0b\u5e8f\u4f4d\u7f6e\u3002\u6b64\u5916\uff0c\u8981\u6ce8\u610f\u7a0b\u5e8f\u7684\u6743\u9650\u8bbe\u7f6e\uff0c\u6709\u4e9b\u7a0b\u5e8f\u53ef\u80fd\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\u624d\u80fd\u8fd0\u884c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u4f20\u9012\u53c2\u6570\u7ed9\u6253\u5f00\u7684\u7a0b\u5e8f\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7\u5728<code>subprocess.run()<\/code>\u6216<code>subprocess.Popen()<\/code>\u4e2d\u6dfb\u52a0\u53c2\u6570\u6765\u4f20\u9012\u7ed9\u5916\u90e8\u7a0b\u5e8f\u3002\u4f8b\u5982\uff0c\u5982\u679c\u9700\u8981\u6253\u5f00\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\u5e76\u5728\u8bb0\u4e8b\u672c\u4e2d\u67e5\u770b\uff0c\u53ef\u4ee5\u8fd9\u6837\u505a\uff1a  <\/p>\n<pre><code class=\"language-python\">import subprocess\n\nsubprocess.run([&quot;notepad.exe&quot;, &quot;example.txt&quot;])  # \u6253\u5f00\u8bb0\u4e8b\u672c\u5e76\u52a0\u8f7d\u6307\u5b9a\u6587\u4ef6\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u5b9e\u73b0\u4e0e\u5916\u90e8\u7a0b\u5e8f\u7684\u6709\u6548\u4ea4\u4e92\uff0c\u589e\u5f3a\u4e86\u529f\u80fd\u7684\u7075\u6d3b\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u6253\u5f00\u53e6\u4e00\u4e2a\u7a0b\u5e8f\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\uff1a\u4f7f\u7528os.system()\u3001subprocess.run()\u3001su [&hellip;]","protected":false},"author":3,"featured_media":1105776,"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\/1105770"}],"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=1105770"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1105770\/revisions"}],"predecessor-version":[{"id":1105779,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1105770\/revisions\/1105779"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1105776"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1105770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1105770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1105770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}