{"id":1108934,"date":"2025-01-08T17:05:07","date_gmt":"2025-01-08T09:05:07","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1108934.html"},"modified":"2025-01-08T17:05:10","modified_gmt":"2025-01-08T09:05:10","slug":"%e5%9c%a8%e6%96%87%e4%bb%b6%e4%b8%ad%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8cpython%e8%84%9a%e6%9c%ac%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1108934.html","title":{"rendered":"\u5728\u6587\u4ef6\u4e2d\u5982\u4f55\u8fd0\u884cpython\u811a\u672c\u6587\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25072417\/cf6ecbc0-5372-47d2-9b65-d5429ed9f4f8.webp\" alt=\"\u5728\u6587\u4ef6\u4e2d\u5982\u4f55\u8fd0\u884cpython\u811a\u672c\u6587\u4ef6\" \/><\/p>\n<p><p> \u5728\u6587\u4ef6\u4e2d\u8fd0\u884cPython\u811a\u672c\u6587\u4ef6\u6709\u591a\u79cd\u65b9\u6cd5\uff0c<strong>\u901a\u8fc7\u547d\u4ee4\u884c\u3001\u4f7f\u7528IDE\u3001\u4f7f\u7528\u4efb\u52a1\u8c03\u5ea6\u5668\u3001\u5d4c\u5165\u5176\u4ed6\u811a\u672c<\/strong>\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\u8fd0\u884cPython\u811a\u672c\u6587\u4ef6\uff0c\u5e76\u5bf9\u5176\u4e2d\u4e00\u79cd\u65b9\u6cd5\u8fdb\u884c\u8be6\u7ec6\u63cf\u8ff0\u3002<\/p>\n<\/p>\n<p><p><strong>\u901a\u8fc7\u547d\u4ee4\u884c<\/strong>\uff1a\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884cPython\u811a\u672c\u662f\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u89e3\u91ca\u5668\u3002\u7136\u540e\u5728\u547d\u4ee4\u884c\u4e2d\u5bfc\u822a\u5230Python\u811a\u672c\u6240\u5728\u7684\u76ee\u5f55\uff0c\u5e76\u6267\u884c\u547d\u4ee4<code>python script_name.py<\/code>\u6216<code>python3 script_name.py<\/code>\uff08\u6839\u636e\u4f60\u7684Python\u7248\u672c\uff09\u3002\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u5927\u591a\u6570\u60c5\u51b5\uff0c\u7279\u522b\u662f\u5f53\u4f60\u9700\u8981\u5feb\u901f\u6d4b\u8bd5\u6216\u8fd0\u884c\u811a\u672c\u65f6\u3002\u8be6\u7ec6\u63cf\u8ff0\uff1a\u5047\u8bbe\u6709\u4e00\u4e2a\u540d\u4e3a<code>example.py<\/code>\u7684Python\u811a\u672c\u6587\u4ef6\uff0c\u5b58\u653e\u5728\u8def\u5f84<code>C:\\Scripts<\/code>\u4e0b\u3002\u9996\u5148\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\uff08\u5728Windows\u4e0a\u53ef\u4ee5\u4f7f\u7528\u201c\u547d\u4ee4\u63d0\u793a\u7b26\u201d\u6216\u201cPowerShell\u201d\uff0c\u5728macOS\u6216Linux\u4e0a\u53ef\u4ee5\u4f7f\u7528\u201c\u7ec8\u7aef\u201d\uff09\u3002\u7136\u540e\uff0c\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5bfc\u822a\u5230\u811a\u672c\u6240\u5728\u76ee\u5f55\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">cd C:\\Scripts<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u63a5\u7740\uff0c\u8fd0\u884c\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">python example.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u4f7f\u7528\u7684\u662fPython 3\uff0c\u547d\u4ee4\u53ef\u80fd\u9700\u8981\u6539\u4e3a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">python3 example.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u811a\u672c\u5c06\u4f1a\u5728\u547d\u4ee4\u884c\u7a97\u53e3\u4e2d\u6267\u884c\uff0c\u5e76\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u901a\u8fc7IDE<\/h3>\n<\/p>\n<p><p>\u5f88\u591a\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u90fd\u63d0\u4f9b\u4e86\u8fd0\u884cPython\u811a\u672c\u7684\u529f\u80fd\u3002\u4f8b\u5982\uff0cPyCharm\u3001Visual Studio Code\u3001Jupyter Notebook\u7b49\u3002IDE\u4e0d\u4ec5\u63d0\u4f9b\u4e86\u8fd0\u884c\u811a\u672c\u7684\u529f\u80fd\uff0c\u8fd8\u63d0\u4f9b\u4e86\u8c03\u8bd5\u3001\u4ee3\u7801\u8865\u5168\u3001\u7248\u672c\u63a7\u5236\u7b49\u591a\u79cd\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528PyCharm<\/h4>\n<\/p>\n<p><p>PyCharm\u662fJetBr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ns\u516c\u53f8\u5f00\u53d1\u7684\u4e00\u6b3e\u4e13\u95e8\u7528\u4e8ePython\u5f00\u53d1\u7684IDE\u3002\u4f7f\u7528PyCharm\u8fd0\u884cPython\u811a\u672c\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u6253\u5f00\u811a\u672c\u6587\u4ef6\uff0c\u70b9\u51fb\u8fd0\u884c\u6309\u94ae\u5373\u53ef\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4e0b\u8f7d\u5b89\u88c5\u5e76\u6253\u5f00PyCharm\u3002<\/p>\n<p>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u9879\u76ee\u6216\u6253\u5f00\u5df2\u6709\u9879\u76ee\u3002<\/p>\n<p>\u5728\u9879\u76ee\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u6587\u4ef6\uff0c\u4f8b\u5982<code>example.py<\/code>\u3002<\/p>\n<p>\u7f16\u5199\u4f60\u7684Python\u4ee3\u7801\uff0c\u4fdd\u5b58\u6587\u4ef6\u3002<\/p>\n<p>\u70b9\u51fbPyCharm\u754c\u9762\u53f3\u4e0a\u89d2\u7684\u8fd0\u884c\u6309\u94ae\uff0c\u811a\u672c\u5c06\u4f1a\u5728\u4e0b\u65b9\u7684\u8fd0\u884c\u7a97\u53e3\u4e2d\u6267\u884c\u5e76\u663e\u793a\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><h4>2. \u4f7f\u7528Visual Studio Code<\/h4>\n<\/p>\n<p><p>Visual Studio Code\uff08VS Code\uff09\u662f\u4e00\u6b3e\u7531\u5fae\u8f6f\u5f00\u53d1\u7684\u5f00\u6e90\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u5305\u62ecPython\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u5b89\u88c5Python\u6269\u5c55\u6765\u589e\u5f3aVS Code\u5bf9Python\u7684\u652f\u6301\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4e0b\u8f7d\u5b89\u88c5\u5e76\u6253\u5f00VS Code\u3002<\/p>\n<p>\u5b89\u88c5Python\u6269\u5c55\uff08\u5728\u6269\u5c55\u5e02\u573a\u4e2d\u641c\u7d22\u201cPython\u201d\u5e76\u5b89\u88c5\uff09\u3002<\/p>\n<p>\u6253\u5f00\u6216\u521b\u5efa\u4e00\u4e2aPython\u811a\u672c\u6587\u4ef6\uff0c\u4f8b\u5982<code>example.py<\/code>\u3002<\/p>\n<p>\u7f16\u5199\u4f60\u7684Python\u4ee3\u7801\uff0c\u4fdd\u5b58\u6587\u4ef6\u3002<\/p>\n<p>\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u8fd0\u884c\u6309\u94ae\uff08\u6216\u4f7f\u7528\u5feb\u6377\u952e<code>Ctrl+F5<\/code>\uff09\uff0c\u811a\u672c\u5c06\u4f1a\u5728\u7ec8\u7aef\u7a97\u53e3\u4e2d\u6267\u884c\u5e76\u663e\u793a\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u4efb\u52a1\u8c03\u5ea6\u5668<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f60\u53ef\u80fd\u5e0c\u671b\u5b9a\u671f\u81ea\u52a8\u8fd0\u884cPython\u811a\u672c\uff0c\u4f8b\u5982\u6bcf\u5929\u5907\u4efd\u6570\u636e\u3001\u6bcf\u5c0f\u65f6\u6293\u53d6\u7f51\u9875\u7b49\u3002\u53ef\u4ee5\u4f7f\u7528\u64cd\u4f5c\u7cfb\u7edf\u81ea\u5e26\u7684\u4efb\u52a1\u8c03\u5ea6\u5de5\u5177\u6765\u5b9e\u73b0\u8fd9\u4e2a\u76ee\u7684\u3002<\/p>\n<\/p>\n<p><h4>1. Windows\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f<\/h4>\n<\/p>\n<p><p>\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f\u6765\u5b9a\u671f\u8fd0\u884cPython\u811a\u672c\u3002<\/p>\n<\/p>\n<p><p>\u6253\u5f00\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f\uff08\u53ef\u4ee5\u5728\u5f00\u59cb\u83dc\u5355\u4e2d\u641c\u7d22\u201c\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f\u201d\uff09\u3002<\/p>\n<p>\u70b9\u51fb\u53f3\u4fa7\u7684\u201c\u521b\u5efa\u57fa\u672c\u4efb\u52a1\u201d\u3002<\/p>\n<p>\u6309\u7167\u5411\u5bfc\u6b65\u9aa4\u586b\u5199\u4efb\u52a1\u540d\u79f0\u3001\u63cf\u8ff0\uff0c\u5e76\u8bbe\u7f6e\u89e6\u53d1\u5668\uff08\u4f8b\u5982\u6bcf\u5929\u3001\u6bcf\u5c0f\u65f6\u7b49\uff09\u3002<\/p>\n<p>\u5728\u64cd\u4f5c\u6b65\u9aa4\u4e2d\uff0c\u9009\u62e9\u201c\u542f\u52a8\u7a0b\u5e8f\u201d\uff0c\u7136\u540e\u6d4f\u89c8\u9009\u62e9Python\u89e3\u91ca\u5668\uff08\u4f8b\u5982<code>C:\\Python39\\python.exe<\/code>\uff09\u3002<\/p>\n<p>\u5728\u201c\u6dfb\u52a0\u53c2\u6570\u201d\u4e2d\uff0c\u586b\u5199\u4f60\u7684Python\u811a\u672c\u6587\u4ef6\u8def\u5f84\uff08\u4f8b\u5982<code>C:\\Scripts\\example.py<\/code>\uff09\u3002<\/p>\n<p>\u5b8c\u6210\u5411\u5bfc\uff0c\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f\u5c06\u4f1a\u6309\u7167\u8bbe\u7f6e\u7684\u89e6\u53d1\u5668\u5b9a\u671f\u8fd0\u884cPython\u811a\u672c\u3002<\/p>\n<\/p>\n<p><h4>2. Cron\u4f5c\u4e1a<\/h4>\n<\/p>\n<p><p>\u5728Linux\u548cmacOS\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528Cron\u4f5c\u4e1a\u6765\u5b9a\u671f\u8fd0\u884cPython\u811a\u672c\u3002<\/p>\n<\/p>\n<p><p>\u6253\u5f00\u7ec8\u7aef\u3002<\/p>\n<p>\u4f7f\u7528<code>crontab -e<\/code>\u547d\u4ee4\u7f16\u8f91Cron\u4f5c\u4e1a\u3002<\/p>\n<p>\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u4e00\u884c\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">0 * * * * \/usr\/bin\/python3 \/path\/to\/your\/script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u8868\u793a\u6bcf\u5c0f\u65f6\u8fd0\u884c\u4e00\u6b21\u811a\u672c\u3002\u4fdd\u5b58\u5e76\u9000\u51fa\u7f16\u8f91\u5668\uff0cCron\u4f5c\u4e1a\u5c06\u4f1a\u6309\u7167\u8bbe\u7f6e\u7684\u65f6\u95f4\u95f4\u9694\u5b9a\u671f\u8fd0\u884cPython\u811a\u672c\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u5d4c\u5165\u5176\u4ed6\u811a\u672c<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u5728\u5176\u4ed6\u7f16\u7a0b\u8bed\u8a00\u7684\u811a\u672c\u4e2d\u8c03\u7528Python\u811a\u672c\u3002\u4f8b\u5982\uff0c\u5728Shell\u811a\u672c\u3001\u6279\u5904\u7406\u6587\u4ef6\u6216\u5176\u4ed6\u7f16\u7a0b\u8bed\u8a00\u4e2d\u5d4c\u5165Python\u811a\u672c\u3002<\/p>\n<\/p>\n<p><h4>1. \u5728Shell\u811a\u672c\u4e2d\u5d4c\u5165<\/h4>\n<\/p>\n<p><p>\u5728Linux\u6216macOS\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u5728Shell\u811a\u672c\u4e2d\u8c03\u7528Python\u811a\u672c\u3002\u521b\u5efa\u4e00\u4e2aShell\u811a\u672c\u6587\u4ef6\uff0c\u4f8b\u5982<code>run_script.sh<\/code>\uff0c\u5e76\u7f16\u5199\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">#!\/bin\/bash<\/p>\n<p>python3 \/path\/to\/your\/script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4fdd\u5b58\u6587\u4ef6\u5e76\u8d4b\u4e88\u6267\u884c\u6743\u9650\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">chmod +x run_script.sh<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u6267\u884cShell\u811a\u672c\u6765\u8fd0\u884cPython\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">.\/run_script.sh<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u5728\u6279\u5904\u7406\u6587\u4ef6\u4e2d\u5d4c\u5165<\/h4>\n<\/p>\n<p><p>\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u5728\u6279\u5904\u7406\u6587\u4ef6\u4e2d\u8c03\u7528Python\u811a\u672c\u3002\u521b\u5efa\u4e00\u4e2a\u6279\u5904\u7406\u6587\u4ef6\uff0c\u4f8b\u5982<code>run_script.bat<\/code>\uff0c\u5e76\u7f16\u5199\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-batch\">@echo off<\/p>\n<p>python C:\\path\\to\\your\\script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4fdd\u5b58\u6587\u4ef6\uff0c\u7136\u540e\u4f60\u53ef\u4ee5\u901a\u8fc7\u6267\u884c\u6279\u5904\u7406\u6587\u4ef6\u6765\u8fd0\u884cPython\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-batch\">run_script.bat<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u547d\u4ee4\u884c\u3001\u4f7f\u7528IDE\u3001\u4f7f\u7528\u4efb\u52a1\u8c03\u5ea6\u5668\u3001\u5d4c\u5165\u5176\u4ed6\u811a\u672c\u7b49\u591a\u79cd\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u7075\u6d3b\u5730\u5728\u6587\u4ef6\u4e2d\u8fd0\u884cPython\u811a\u672c\u3002\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\uff0c\u81ea\u52a8\u5316\u4efb\u52a1\u5904\u7406\u3002\u65e0\u8bba\u662f\u5feb\u901f\u6d4b\u8bd5\u3001\u5b9a\u671f\u4efb\u52a1\u8fd8\u662f\u4e0e\u5176\u4ed6\u7f16\u7a0b\u8bed\u8a00\u7684\u96c6\u6210\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u90fd\u80fd\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u4f7f\u7528Python\u811a\u672c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u8fd0\u884cPython\u811a\u672c\u6587\u4ef6\uff1f<\/strong><br \/>\u5728Windows\u3001macOS\u548cLinux\u7b49\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u8fd0\u884cPython\u811a\u672c\u7684\u65b9\u5f0f\u7565\u6709\u4e0d\u540c\u3002\u5bf9\u4e8eWindows\u7528\u6237\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165<code>python script.py<\/code>\u6765\u6267\u884c\u811a\u672c\uff1bmacOS\u548cLinux\u7528\u6237\u5219\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u4f7f\u7528\u76f8\u540c\u7684\u547d\u4ee4\u3002\u786e\u4fdd\u5df2\u5b89\u88c5Python\uff0c\u5e76\u4e14\u73af\u5883\u53d8\u91cf\u5df2\u6b63\u786e\u914d\u7f6e\uff0c\u4ee5\u907f\u514d\u8fd0\u884c\u65f6\u9519\u8bef\u3002<\/p>\n<p><strong>\u662f\u5426\u9700\u8981\u5b89\u88c5\u989d\u5916\u7684\u5e93\u6216\u4f9d\u8d56\u624d\u80fd\u8fd0\u884c\u6211\u7684Python\u811a\u672c\uff1f<\/strong><br \/>\u53d6\u51b3\u4e8e\u60a8\u7684\u811a\u672c\u5185\u5bb9\u3002\u82e5\u811a\u672c\u4e2d\u4f7f\u7528\u4e86\u7279\u5b9a\u7684\u7b2c\u4e09\u65b9\u5e93\uff0c\u60a8\u9700\u8981\u786e\u4fdd\u8fd9\u4e9b\u5e93\u5df2\u5b89\u88c5\u3002\u53ef\u4ee5\u901a\u8fc7<code>pip install library_name<\/code>\u547d\u4ee4\u5b89\u88c5\u9700\u8981\u7684\u5e93\u3002\u6b64\u5916\uff0c\u4f7f\u7528\u865a\u62df\u73af\u5883\uff08\u5982<code>venv<\/code>\uff09\u53ef\u4ee5\u66f4\u597d\u5730\u7ba1\u7406\u9879\u76ee\u4f9d\u8d56\uff0c\u907f\u514d\u4e0e\u5176\u4ed6\u9879\u76ee\u51b2\u7a81\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u811a\u672c\u4e2d\u5904\u7406\u9519\u8bef\u6216\u8c03\u8bd5\u4fe1\u606f\uff1f<\/strong><br \/>\u5728Python\u811a\u672c\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>try...except<\/code>\u8bed\u53e5\u6765\u6355\u83b7\u5e76\u5904\u7406\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u3002\u4e3a\u4e86\u83b7\u5f97\u66f4\u8be6\u7ec6\u7684\u8c03\u8bd5\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528<code>print()<\/code>\u51fd\u6570\u8f93\u51fa\u53d8\u91cf\u7684\u503c\uff0c\u6216\u4f7f\u7528<code>logging<\/code>\u6a21\u5757\u8bb0\u5f55\u65e5\u5fd7\u3002\u8fd9\u4e9b\u65b9\u6cd5\u6709\u52a9\u4e8e\u8bc6\u522b\u548c\u89e3\u51b3\u811a\u672c\u8fd0\u884c\u4e2d\u9047\u5230\u7684\u95ee\u9898\uff0c\u63d0\u9ad8\u4ee3\u7801\u7684\u5065\u58ee\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728\u6587\u4ef6\u4e2d\u8fd0\u884cPython\u811a\u672c\u6587\u4ef6\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u901a\u8fc7\u547d\u4ee4\u884c\u3001\u4f7f\u7528IDE\u3001\u4f7f\u7528\u4efb\u52a1\u8c03\u5ea6\u5668\u3001\u5d4c\u5165\u5176\u4ed6\u811a\u672c\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb [&hellip;]","protected":false},"author":3,"featured_media":1108940,"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\/1108934"}],"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=1108934"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1108934\/revisions"}],"predecessor-version":[{"id":1108944,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1108934\/revisions\/1108944"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1108940"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1108934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1108934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1108934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}