{"id":1155855,"date":"2025-01-13T18:08:52","date_gmt":"2025-01-13T10:08:52","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1155855.html"},"modified":"2025-01-13T18:08:55","modified_gmt":"2025-01-13T10:08:55","slug":"%e5%a6%82%e4%bd%95%e6%89%b9%e9%87%8f%e8%b7%91python%e8%84%9a%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1155855.html","title":{"rendered":"\u5982\u4f55\u6279\u91cf\u8dd1python\u811a\u672c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25194406\/89999194-6325-4441-ad06-66481b63ccb3.webp\" alt=\"\u5982\u4f55\u6279\u91cf\u8dd1python\u811a\u672c\" \/><\/p>\n<p><p> \u8981\u6279\u91cf\u8fd0\u884cPython\u811a\u672c\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\uff0c\u4f8b\u5982<strong>\u4f7f\u7528shell\u811a\u672c\u3001\u4f7f\u7528Python\u811a\u672c\u6765\u8c03\u7528\u5176\u4ed6Python\u811a\u672c\u3001\u4f7f\u7528\u4efb\u52a1\u8c03\u5ea6\u5668\uff08\u5982cron\u6216Windows\u4efb\u52a1\u8ba1\u5212\uff09<\/strong>\u3002\u5176\u4e2d\uff0c\u4f7f\u7528shell\u811a\u672c\u662f\u4e00\u4e2a\u9ad8\u6548\u4e14\u6613\u4e8e\u5b9e\u73b0\u7684\u65b9\u6cd5\u3002\u4e0b\u9762\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u7f16\u5199shell\u811a\u672c\u6765\u6279\u91cf\u8fd0\u884cPython\u811a\u672c\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528Shell\u811a\u672c<\/h3>\n<\/p>\n<p><h4>1. \u7f16\u5199Shell\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Shell\u811a\u672c\u6587\u4ef6\uff0c\u4f8b\u5982<code>run_python_scripts.sh<\/code>\uff0c\u5e76\u5728\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">#!\/bin\/bash<\/p>\n<h2><strong>\u6307\u5b9a\u5305\u542bPython\u811a\u672c\u7684\u76ee\u5f55<\/strong><\/h2>\n<p>SCRIPT_DIR=&quot;\/path\/to\/your\/python\/scripts&quot;<\/p>\n<h2><strong>\u904d\u5386\u76ee\u5f55\u4e2d\u7684\u6240\u6709Python\u811a\u672c\u5e76\u9010\u4e00\u8fd0\u884c<\/strong><\/h2>\n<p>for script in &quot;$SCRIPT_DIR&quot;\/*.py; do<\/p>\n<p>    python &quot;$script&quot;<\/p>\n<p>done<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u8d4b\u4e88\u6267\u884c\u6743\u9650<\/h4>\n<\/p>\n<p><p>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff0c\u8d4b\u4e88\u811a\u672c\u6267\u884c\u6743\u9650\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">chmod +x run_python_scripts.sh<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u8fd0\u884cShell\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u6267\u884cShell\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">.\/run_python_scripts.sh<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528Python\u811a\u672c\u8c03\u7528\u5176\u4ed6Python\u811a\u672c<\/h3>\n<\/p>\n<p><h4>1. \u7f16\u5199\u4e3bPython\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a\u4e3bPython\u811a\u672c\uff0c\u4f8b\u5982<code>run_scripts.py<\/code>\uff0c\u5e76\u5728\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>import subprocess<\/p>\n<h2><strong>\u6307\u5b9a\u5305\u542bPython\u811a\u672c\u7684\u76ee\u5f55<\/strong><\/h2>\n<p>script_dir = &quot;\/path\/to\/your\/python\/scripts&quot;<\/p>\n<h2><strong>\u904d\u5386\u76ee\u5f55\u4e2d\u7684\u6240\u6709Python\u811a\u672c\u5e76\u9010\u4e00\u8fd0\u884c<\/strong><\/h2>\n<p>for script in os.listdir(script_dir):<\/p>\n<p>    if script.endswith(&quot;.py&quot;):<\/p>\n<p>        script_path = os.path.join(script_dir, script)<\/p>\n<p>        subprocess.run([&quot;python&quot;, script_path])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u8fd0\u884c\u4e3bPython\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python run_scripts.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u4efb\u52a1\u8c03\u5ea6\u5668<\/h3>\n<\/p>\n<p><h4>1. \u4f7f\u7528cron\uff08\u5728Linux\u548cmacOS\u4e0a\uff09<\/h4>\n<\/p>\n<p><p>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u7f16\u8f91crontab\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">crontab -e<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\u4ee5\u5b9a\u671f\u8fd0\u884cShell\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">0 * * * * \/path\/to\/your\/run_python_scripts.sh<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528Windows\u4efb\u52a1\u8ba1\u5212<\/h4>\n<\/p>\n<ol>\n<li>\u6253\u5f00\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2a\u57fa\u672c\u4efb\u52a1\u3002<\/li>\n<li>\u8bbe\u7f6e\u89e6\u53d1\u5668\uff08\u4f8b\u5982\u6bcf\u5929\u6216\u6bcf\u5c0f\u65f6\u8fd0\u884c\u4e00\u6b21\uff09\u3002<\/li>\n<li>\u8bbe\u7f6e\u64cd\u4f5c\uff0c\u9009\u62e9\u201c\u542f\u52a8\u7a0b\u5e8f\u201d\uff0c\u5e76\u9009\u62e9Shell\u811a\u672c\u6216Python\u811a\u672c\u3002<\/li>\n<\/ol>\n<p><h3>\u56db\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p><strong>\u6279\u91cf\u8fd0\u884cPython\u811a\u672c\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528Shell\u811a\u672c\u3001Python\u811a\u672c\u4ee5\u53ca\u4efb\u52a1\u8c03\u5ea6\u5668<\/strong>\u3002\u5176\u4e2d\uff0c\u4f7f\u7528Shell\u811a\u672c\u662f\u4e00\u4e2a\u9ad8\u6548\u4e14\u6613\u4e8e\u5b9e\u73b0\u7684\u65b9\u6cd5\u3002\u5c06\u6240\u6709Python\u811a\u672c\u653e\u7f6e\u5728\u540c\u4e00\u76ee\u5f55\u4e0b\uff0c\u901a\u8fc7\u904d\u5386\u76ee\u5f55\u4e2d\u7684\u6240\u6709Python\u811a\u672c\u5e76\u9010\u4e00\u8fd0\u884c\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5b9e\u73b0\u6279\u91cf\u6267\u884c\u3002<strong>\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u7b80\u5355\u6613\u884c\uff0c\u8fd8\u80fd\u6709\u6548\u8282\u7701\u65f6\u95f4\u548c\u7cbe\u529b<\/strong>\u3002<\/p>\n<\/p>\n<p><h4>\u4f7f\u7528Shell\u811a\u672c\u7684\u4f18\u52bf<\/h4>\n<\/p>\n<p><p><strong>Shell\u811a\u672c<\/strong>\u662f\u6279\u91cf\u8fd0\u884cPython\u811a\u672c\u7684\u4e00\u4e2a\u9ad8\u6548\u65b9\u6cd5\u3002\u5176\u4f18\u52bf\u5728\u4e8e<strong>\u64cd\u4f5c\u7b80\u5355\uff0c\u6613\u4e8e\u7ef4\u62a4<\/strong>\u3002\u901a\u8fc7\u7f16\u5199\u4e00\u4e2a\u5305\u542b\u6240\u6709Python\u811a\u672c\u8def\u5f84\u7684Shell\u811a\u672c\uff0c\u53ef\u4ee5\u5feb\u901f\u6267\u884c\u6240\u6709\u811a\u672c\uff0c\u4e14\u65e0\u9700\u9010\u4e00\u624b\u52a8\u8fd0\u884c\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u8be6\u7ec6\u63cf\u8ff0\u4f7f\u7528Shell\u811a\u672c\u7684\u65b9\u6cd5<\/h3>\n<\/p>\n<p><h4>1. \u7f16\u5199Shell\u811a\u672c\u7684\u6b65\u9aa4<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Shell\u811a\u672c\u6587\u4ef6\uff0c\u4f8b\u5982<code>run_python_scripts.sh<\/code>\u3002\u5728\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">#!\/bin\/bash<\/p>\n<h2><strong>\u6307\u5b9a\u5305\u542bPython\u811a\u672c\u7684\u76ee\u5f55<\/strong><\/h2>\n<p>SCRIPT_DIR=&quot;\/path\/to\/your\/python\/scripts&quot;<\/p>\n<h2><strong>\u904d\u5386\u76ee\u5f55\u4e2d\u7684\u6240\u6709Python\u811a\u672c\u5e76\u9010\u4e00\u8fd0\u884c<\/strong><\/h2>\n<p>for script in &quot;$SCRIPT_DIR&quot;\/*.py; do<\/p>\n<p>    python &quot;$script&quot;<\/p>\n<p>done<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u7684\u4f5c\u7528\u662f\u904d\u5386\u6307\u5b9a\u76ee\u5f55\u4e2d\u7684\u6240\u6709Python\u811a\u672c\uff0c\u5e76\u4f7f\u7528Python\u89e3\u91ca\u5668\u9010\u4e00\u8fd0\u884c\u3002<\/p>\n<\/p>\n<p><h4>2. \u8d4b\u4e88\u6267\u884c\u6743\u9650<\/h4>\n<\/p>\n<p><p>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff0c\u8d4b\u4e88\u811a\u672c\u6267\u884c\u6743\u9650\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">chmod +x run_python_scripts.sh<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6837\u53ef\u4ee5\u786e\u4fddShell\u811a\u672c\u5177\u6709\u6267\u884c\u6743\u9650\u3002<\/p>\n<\/p>\n<p><h4>3. \u8fd0\u884cShell\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u6267\u884cShell\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">.\/run_python_scripts.sh<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6837\uff0cShell\u811a\u672c\u4f1a\u81ea\u52a8\u904d\u5386\u5e76\u8fd0\u884c\u6307\u5b9a\u76ee\u5f55\u4e2d\u7684\u6240\u6709Python\u811a\u672c\u3002<\/p>\n<\/p>\n<p><h4>4. \u5b9a\u671f\u8fd0\u884cShell\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u4e3a\u4e86\u5b9a\u671f\u8fd0\u884cShell\u811a\u672c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4efb\u52a1\u8c03\u5ea6\u5668\u3002\u4f8b\u5982\uff0c\u5728Linux\u548cmacOS\u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528cron\u3002\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u7f16\u8f91crontab\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">crontab -e<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\u4ee5\u5b9a\u671f\u8fd0\u884cShell\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">0 * * * * \/path\/to\/your\/run_python_scripts.sh<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u8868\u793a\u6bcf\u5c0f\u65f6\u8fd0\u884c\u4e00\u6b21Shell\u811a\u672c\u3002\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8c03\u6574\u8c03\u5ea6\u9891\u7387\u3002<\/p>\n<\/p>\n<p><h4>5. \u4f7f\u7528Windows\u4efb\u52a1\u8ba1\u5212<\/h4>\n<\/p>\n<p><p>\u5728Windows\u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f\u6765\u5b9a\u671f\u8fd0\u884cShell\u811a\u672c\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2a\u57fa\u672c\u4efb\u52a1\u3002<\/li>\n<li>\u8bbe\u7f6e\u89e6\u53d1\u5668\uff08\u4f8b\u5982\u6bcf\u5929\u6216\u6bcf\u5c0f\u65f6\u8fd0\u884c\u4e00\u6b21\uff09\u3002<\/li>\n<li>\u8bbe\u7f6e\u64cd\u4f5c\uff0c\u9009\u62e9\u201c\u542f\u52a8\u7a0b\u5e8f\u201d\uff0c\u5e76\u9009\u62e9Shell\u811a\u672c\u6216Python\u811a\u672c\u3002<\/li>\n<\/ol>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p><strong>\u6279\u91cf\u8fd0\u884cPython\u811a\u672c\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528Shell\u811a\u672c\u3001Python\u811a\u672c\u4ee5\u53ca\u4efb\u52a1\u8c03\u5ea6\u5668<\/strong>\u3002\u5176\u4e2d\uff0c\u4f7f\u7528Shell\u811a\u672c\u662f\u4e00\u4e2a\u9ad8\u6548\u4e14\u6613\u4e8e\u5b9e\u73b0\u7684\u65b9\u6cd5\u3002\u901a\u8fc7\u7f16\u5199\u4e00\u4e2a\u5305\u542b\u6240\u6709Python\u811a\u672c\u8def\u5f84\u7684Shell\u811a\u672c\uff0c\u53ef\u4ee5\u5feb\u901f\u6267\u884c\u6240\u6709\u811a\u672c\uff0c\u4e14\u65e0\u9700\u9010\u4e00\u624b\u52a8\u8fd0\u884c\u3002<strong>\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u7b80\u5355\u6613\u884c\uff0c\u8fd8\u80fd\u6709\u6548\u8282\u7701\u65f6\u95f4\u548c\u7cbe\u529b<\/strong>\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528Shell\u811a\u672c\u7684\u4f18\u52bf\u5728\u4e8e<strong>\u64cd\u4f5c\u7b80\u5355\uff0c\u6613\u4e8e\u7ef4\u62a4<\/strong>\u3002\u901a\u8fc7\u7f16\u5199\u4e00\u4e2a\u5305\u542b\u6240\u6709Python\u811a\u672c\u8def\u5f84\u7684Shell\u811a\u672c\uff0c\u53ef\u4ee5\u5feb\u901f\u6267\u884c\u6240\u6709\u811a\u672c\uff0c\u4e14\u65e0\u9700\u9010\u4e00\u624b\u52a8\u8fd0\u884c\u3002<strong>\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u7b80\u5355\u6613\u884c\uff0c\u8fd8\u80fd\u6709\u6548\u8282\u7701\u65f6\u95f4\u548c\u7cbe\u529b<\/strong>\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u6765\u6279\u91cf\u8fd0\u884cPython\u811a\u672c\uff1f<\/strong><br \/>\u5728\u9009\u62e9\u6279\u91cf\u8fd0\u884cPython\u811a\u672c\u7684\u5de5\u5177\u65f6\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u4efb\u52a1\u8c03\u5ea6\u7a0b\u5e8f\u5982Cron\uff08\u5728Linux\u4e0a\uff09\u6216Windows Task Scheduler\u3002\u8fd9\u4e9b\u5de5\u5177\u5141\u8bb8\u7528\u6237\u8bbe\u7f6e\u7279\u5b9a\u65f6\u95f4\u6216\u5468\u671f\u6027\u4efb\u52a1\u6765\u81ea\u52a8\u6267\u884c\u811a\u672c\u3002\u6b64\u5916\uff0c\u4f7f\u7528Python\u7684\u5185\u7f6e\u5e93\u5982<code>subprocess<\/code>\uff0c\u53ef\u4ee5\u5728\u4e00\u4e2a\u4e3b\u811a\u672c\u4e2d\u8c03\u7528\u5176\u4ed6\u811a\u672c\uff0c\u4ece\u800c\u5b9e\u73b0\u6279\u91cf\u6267\u884c\u3002<\/p>\n<p><strong>\u6279\u91cf\u8fd0\u884cPython\u811a\u672c\u4f1a\u5f71\u54cd\u7cfb\u7edf\u6027\u80fd\u5417\uff1f<\/strong><br \/>\u6279\u91cf\u8fd0\u884c\u591a\u4e2aPython\u811a\u672c\u786e\u5b9e\u53ef\u80fd\u5bf9\u7cfb\u7edf\u6027\u80fd\u4ea7\u751f\u5f71\u54cd\uff0c\u5c24\u5176\u662f\u5728\u8d44\u6e90\u6709\u9650\u7684\u60c5\u51b5\u4e0b\u3002\u4e3a\u4e86\u51cf\u5c0f\u5bf9\u7cfb\u7edf\u6027\u80fd\u7684\u5f71\u54cd\uff0c\u53ef\u4ee5\u8003\u8651\u8bbe\u7f6e\u811a\u672c\u7684\u6267\u884c\u4f18\u5148\u7ea7\u3001\u9650\u5236\u540c\u65f6\u8fd0\u884c\u7684\u811a\u672c\u6570\u91cf\uff0c\u6216\u8005\u5728\u4f4e\u5cf0\u65f6\u6bb5\u6267\u884c\u8fd9\u4e9b\u811a\u672c\uff0c\u4ece\u800c\u786e\u4fdd\u7cfb\u7edf\u7684\u7a33\u5b9a\u6027\u548c\u6d41\u7545\u6027\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u6279\u91cf\u8fd0\u884c\u4e2d\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\uff1f<\/strong><br \/>\u5728\u6279\u91cf\u8fd0\u884cPython\u811a\u672c\u65f6\uff0c\u9519\u8bef\u5904\u7406\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u53ef\u4ee5\u5728\u6bcf\u4e2a\u811a\u672c\u4e2d\u6dfb\u52a0\u5f02\u5e38\u6355\u83b7\u673a\u5236\uff0c\u901a\u8fc7<code>try<\/code>\u548c<code>except<\/code>\u8bed\u53e5\u6765\u6355\u83b7\u6f5c\u5728\u7684\u9519\u8bef\u3002\u540c\u65f6\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u65e5\u5fd7\u8bb0\u5f55\u529f\u80fd\uff0c\u5c06\u6267\u884c\u8fc7\u7a0b\u4e2d\u7684\u9519\u8bef\u4fe1\u606f\u5199\u5165\u65e5\u5fd7\u6587\u4ef6\uff0c\u4ee5\u4fbf\u540e\u7eed\u5206\u6790\u548c\u4fee\u590d\u3002\u6b64\u5916\uff0c\u4f7f\u7528<code>exit<\/code>\u4ee3\u7801\u53ef\u4ee5\u5e2e\u52a9\u8bc6\u522b\u54ea\u4e9b\u811a\u672c\u6267\u884c\u5931\u8d25\uff0c\u4ece\u800c\u91c7\u53d6\u76f8\u5e94\u7684\u63aa\u65bd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u6279\u91cf\u8fd0\u884cPython\u811a\u672c\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\uff0c\u4f8b\u5982\u4f7f\u7528shell\u811a\u672c\u3001\u4f7f\u7528Python\u811a\u672c\u6765\u8c03\u7528\u5176\u4ed6Pytho [&hellip;]","protected":false},"author":3,"featured_media":1155859,"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\/1155855"}],"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=1155855"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1155855\/revisions"}],"predecessor-version":[{"id":1155861,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1155855\/revisions\/1155861"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1155859"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1155855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1155855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1155855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}