{"id":1049739,"date":"2024-12-31T14:01:55","date_gmt":"2024-12-31T06:01:55","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1049739.html"},"modified":"2024-12-31T14:01:57","modified_gmt":"2024-12-31T06:01:57","slug":"python%e5%a6%82%e4%bd%95%e6%b7%bb%e5%8a%a0%e5%88%b0%e6%a1%8c%e9%9d%a2%e4%b8%8a","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1049739.html","title":{"rendered":"python\u5982\u4f55\u6dfb\u52a0\u5230\u684c\u9762\u4e0a"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/12023853-7553-4482-afc9-c9504fb71d86.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u6dfb\u52a0\u5230\u684c\u9762\u4e0a\" \/><\/p>\n<p><p> <strong>Python\u6dfb\u52a0\u5230\u684c\u9762\u4e0a\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u5feb\u6377\u65b9\u5f0f\u521b\u5efa\u3001\u811a\u672c\u6587\u4ef6\u4fdd\u5b58\u3001\u56fe\u6807\u5b9a\u5236\u7b49\u3002<\/strong><\/p>\n<\/p>\n<p><p><strong>\u521b\u5efa\u5feb\u6377\u65b9\u5f0f<\/strong>\u662f\u4e00\u79cd\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\uff0c\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a\u6307\u5411Python\u811a\u672c\u7684\u5feb\u6377\u65b9\u5f0f\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5c06Python\u811a\u672c\u6dfb\u52a0\u5230\u684c\u9762\u4e0a\u3002<strong>\u811a\u672c\u6587\u4ef6\u4fdd\u5b58<\/strong>\u662f\u6307\u5c06Python\u811a\u672c\u6587\u4ef6\u76f4\u63a5\u4fdd\u5b58\u5230\u684c\u9762\u4e0a\uff0c\u4ee5\u4fbf\u4e8e\u5feb\u901f\u8bbf\u95ee\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5<strong>\u5b9a\u5236\u56fe\u6807<\/strong>\uff0c\u4f7f\u684c\u9762\u4e0a\u7684\u5feb\u6377\u65b9\u5f0f\u6216\u811a\u672c\u6587\u4ef6\u5177\u6709\u72ec\u7279\u7684\u56fe\u6807\uff0c\u4fbf\u4e8e\u8bc6\u522b\u548c\u7f8e\u89c2\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\u548c\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u521b\u5efa\u5feb\u6377\u65b9\u5f0f<\/h3>\n<\/p>\n<p><p>\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\u662f\u5c06Python\u811a\u672c\u6dfb\u52a0\u5230\u684c\u9762\u4e0a\u7684\u4e00\u79cd\u5e38\u89c1\u65b9\u6cd5\u3002\u4ee5\u4e0b\u662f\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u627e\u5230Python\u811a\u672c\u6587\u4ef6<\/strong>\uff1a\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684Python\u811a\u672c\u6587\u4ef6\u5df2\u7ecf\u5b58\u5728\uff0c\u5e76\u4e14\u4f60\u77e5\u9053\u5b83\u7684\u5b58\u50a8\u8def\u5f84\u3002<\/li>\n<li><strong>\u53f3\u952e\u70b9\u51fb\u811a\u672c\u6587\u4ef6<\/strong>\uff1a\u5728\u6587\u4ef6<a href=\"https:\/\/docs.pingcode.com\/blog\/project-management\/58557.html\" target=\"_blank\">\u8d44\u6e90\u7ba1\u7406<\/a>\u5668\u4e2d\uff0c\u53f3\u952e\u70b9\u51fb\u4f60\u60f3\u8981\u6dfb\u52a0\u5230\u684c\u9762\u4e0a\u7684Python\u811a\u672c\u6587\u4ef6\u3002<\/li>\n<li><strong>\u9009\u62e9\u201c\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\u201d<\/strong>\uff1a\u5728\u53f3\u952e\u83dc\u5355\u4e2d\uff0c\u9009\u62e9\u201c\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\u201d\u3002\u7cfb\u7edf\u4f1a\u81ea\u52a8\u5728\u540c\u4e00\u4f4d\u7f6e\u751f\u6210\u4e00\u4e2a\u5feb\u6377\u65b9\u5f0f\u3002<\/li>\n<li><strong>\u5c06\u5feb\u6377\u65b9\u5f0f\u79fb\u52a8\u5230\u684c\u9762<\/strong>\uff1a\u5c06\u751f\u6210\u7684\u5feb\u6377\u65b9\u5f0f\u6587\u4ef6\u62d6\u52a8\u5230\u684c\u9762\u4e0a\u3002\u8fd9\u6837\uff0c\u4f60\u5c31\u53ef\u4ee5\u901a\u8fc7\u53cc\u51fb\u684c\u9762\u4e0a\u7684\u5feb\u6377\u65b9\u5f0f\u6765\u8fd0\u884cPython\u811a\u672c\u4e86\u3002<\/li>\n<\/ol>\n<p><p>\u8fd9\u4e2a\u65b9\u6cd5\u7684\u4f18\u70b9\u662f\u7b80\u5355\u5feb\u6377\uff0c\u4e0d\u9700\u8981\u989d\u5916\u7684\u8f6f\u4ef6\u6216\u590d\u6742\u7684\u914d\u7f6e\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u811a\u672c\u6587\u4ef6\u4fdd\u5b58<\/h3>\n<\/p>\n<p><p>\u5c06Python\u811a\u672c\u6587\u4ef6\u76f4\u63a5\u4fdd\u5b58\u5230\u684c\u9762\u4e0a\u4e5f\u662f\u4e00\u79cd\u6709\u6548\u7684\u65b9\u6cd5\u3002\u4ee5\u4e0b\u662f\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u7f16\u5199Python\u811a\u672c<\/strong>\uff1a\u4f7f\u7528\u4f60\u559c\u6b22\u7684\u6587\u672c\u7f16\u8f91\u5668\u6216IDE\uff08\u5982PyCharm\u3001VSCode\u3001Jupyter Notebook\u7b49\uff09\u7f16\u5199Python\u811a\u672c\u3002<\/li>\n<li><strong>\u4fdd\u5b58\u6587\u4ef6<\/strong>\uff1a\u5728\u4fdd\u5b58\u6587\u4ef6\u65f6\uff0c\u9009\u62e9\u684c\u9762\u4f5c\u4e3a\u4fdd\u5b58\u4f4d\u7f6e\uff0c\u5e76\u786e\u4fdd\u6587\u4ef6\u6269\u5c55\u540d\u4e3a\u201c.py\u201d\u3002<\/li>\n<li><strong>\u8fd0\u884c\u811a\u672c<\/strong>\uff1a\u53cc\u51fb\u684c\u9762\u4e0a\u7684Python\u811a\u672c\u6587\u4ef6\u5373\u53ef\u8fd0\u884c\u3002<\/li>\n<\/ol>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u662f\u76f4\u63a5\u3001\u5feb\u901f\uff0c\u9002\u7528\u4e8e\u9700\u8981\u9891\u7e41\u4fee\u6539\u548c\u8fd0\u884c\u7684\u811a\u672c\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u5b9a\u5236\u56fe\u6807<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u4f7f\u684c\u9762\u4e0a\u7684Python\u811a\u672c\u6216\u5feb\u6377\u65b9\u5f0f\u66f4\u52a0\u7f8e\u89c2\u548c\u6613\u4e8e\u8bc6\u522b\uff0c\u53ef\u4ee5\u5b9a\u5236\u56fe\u6807\u3002\u4ee5\u4e0b\u662f\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u51c6\u5907\u56fe\u6807\u6587\u4ef6<\/strong>\uff1a\u9996\u5148\uff0c\u51c6\u5907\u4e00\u4e2a.ico\u683c\u5f0f\u7684\u56fe\u6807\u6587\u4ef6\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u5728\u7ebf\u56fe\u6807\u751f\u6210\u5de5\u5177\u5c06PNG\u6216JPG\u56fe\u7247\u8f6c\u6362\u4e3aICO\u683c\u5f0f\u3002<\/li>\n<li><strong>\u53f3\u952e\u70b9\u51fb\u5feb\u6377\u65b9\u5f0f<\/strong>\uff1a\u5728\u684c\u9762\u4e0a\u627e\u5230\u4f60\u5df2\u7ecf\u521b\u5efa\u7684\u5feb\u6377\u65b9\u5f0f\uff0c\u53f3\u952e\u70b9\u51fb\u5e76\u9009\u62e9\u201c\u5c5e\u6027\u201d\u3002<\/li>\n<li><strong>\u66f4\u6539\u56fe\u6807<\/strong>\uff1a\u5728\u5c5e\u6027\u7a97\u53e3\u4e2d\uff0c\u70b9\u51fb\u201c\u66f4\u6539\u56fe\u6807\u201d\u6309\u94ae\uff0c\u9009\u62e9\u4f60\u51c6\u5907\u597d\u7684ICO\u6587\u4ef6\u3002<\/li>\n<li><strong>\u5e94\u7528\u66f4\u6539<\/strong>\uff1a\u70b9\u51fb\u201c\u5e94\u7528\u201d\u6309\u94ae\uff0c\u7136\u540e\u70b9\u51fb\u201c\u786e\u5b9a\u201d\u4ee5\u4fdd\u5b58\u66f4\u6539\u3002<\/li>\n<\/ol>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u662f\u7f8e\u89c2\u4e14\u6709\u52a9\u4e8e\u5feb\u901f\u8bc6\u522b\u7279\u5b9a\u7684Python\u811a\u672c\u6216\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528Python\u811a\u672c\u81ea\u52a8\u521b\u5efa\u5feb\u6377\u65b9\u5f0f<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u9700\u8981\u4e3a\u591a\u4e2aPython\u811a\u672c\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\uff0c\u53ef\u4ee5\u7f16\u5199\u4e00\u4e2aPython\u811a\u672c\u6765\u81ea\u52a8\u5b8c\u6210\u8fd9\u4e00\u4efb\u52a1\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>import winshell<\/p>\n<p>from win32com.client import Dispatch<\/p>\n<p>def create_shortcut(script_path, shortcut_path):<\/p>\n<p>    shell = Dispatch(&#39;WScript.Shell&#39;)<\/p>\n<p>    shortcut = shell.CreateShortCut(shortcut_path)<\/p>\n<p>    shortcut.Targetpath = script_path<\/p>\n<p>    shortcut.WorkingDirectory = os.path.dirname(script_path)<\/p>\n<p>    shortcut.save()<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>script_path = r&#39;C:\\path\\to\\your\\script.py&#39;<\/p>\n<p>shortcut_path = r&#39;C:\\Users\\YourUsername\\Desktop\\script_shortcut.lnk&#39;<\/p>\n<p>create_shortcut(script_path, shortcut_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u811a\u672c\u4f7f\u7528\u4e86<code>winshell<\/code>\u548c<code>win32com.client<\/code>\u5e93\u6765\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\u3002\u5c06<code>script_path<\/code>\u548c<code>shortcut_path<\/code>\u66ff\u6362\u4e3a\u4f60\u7684Python\u811a\u672c\u8def\u5f84\u548c\u5feb\u6377\u65b9\u5f0f\u4fdd\u5b58\u8def\u5f84\uff0c\u7136\u540e\u8fd0\u884c\u8be5\u811a\u672c\u5373\u53ef\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528PyInstaller\u6253\u5305Python\u811a\u672c<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u5e0c\u671b\u5c06Python\u811a\u672c\u6253\u5305\u6210\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\u5e76\u6dfb\u52a0\u5230\u684c\u9762\uff0c\u53ef\u4ee5\u4f7f\u7528PyInstaller\u3002\u4ee5\u4e0b\u662f\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5PyInstaller<\/strong>\uff1a\u6253\u5f00\u547d\u4ee4\u884c\uff0c\u8fd0\u884c<code>pip install pyinstaller<\/code>\u3002<\/li>\n<li><strong>\u6253\u5305\u811a\u672c<\/strong>\uff1a\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u5bfc\u822a\u5230Python\u811a\u672c\u6240\u5728\u76ee\u5f55\uff0c\u8fd0\u884c<code>pyinstaller --onefile your_script.py<\/code>\u3002<\/li>\n<li><strong>\u627e\u5230\u53ef\u6267\u884c\u6587\u4ef6<\/strong>\uff1a\u6253\u5305\u5b8c\u6210\u540e\uff0c\u5728<code>dist<\/code>\u76ee\u5f55\u4e2d\u627e\u5230\u751f\u6210\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/li>\n<li><strong>\u521b\u5efa\u5feb\u6377\u65b9\u5f0f<\/strong>\uff1a\u5c06\u751f\u6210\u7684\u53ef\u6267\u884c\u6587\u4ef6\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\u5e76\u79fb\u52a8\u5230\u684c\u9762\u4e0a\uff0c\u65b9\u6cd5\u540c\u4e0a\u3002<\/li>\n<\/ol>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u662f\u751f\u6210\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u65e0\u9700\u4f9d\u8d56Python\u73af\u5883\uff0c\u9002\u7528\u4e8e\u5206\u53d1\u548c\u53d1\u5e03Python\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u4e0a\u8ff0\u65b9\u6cd5\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u7b2c\u4e09\u65b9\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5c06Python\u811a\u672c\u6dfb\u52a0\u5230\u684c\u9762\u4e0a\uff0c\u5982\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>Inno Setup<\/strong>\uff1a\u4e00\u4e2a\u514d\u8d39\u7684\u5b89\u88c5\u7a0b\u5e8f\u5236\u4f5c\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u521b\u5efa\u5b89\u88c5\u7a0b\u5e8f\uff0c\u5c06Python\u811a\u672c\u6253\u5305\u5e76\u5b89\u88c5\u5230\u6307\u5b9a\u4f4d\u7f6e\uff0c\u5305\u62ec\u684c\u9762\u5feb\u6377\u65b9\u5f0f\u3002<\/li>\n<li><strong>NSIS\uff08Nullsoft Scriptable Install System\uff09<\/strong>\uff1a\u4e00\u4e2a\u5f00\u6e90\u7684\u5b89\u88c5\u7cfb\u7edf\uff0c\u4e0eInno Setup\u7c7b\u4f3c\uff0c\u53ef\u4ee5\u521b\u5efa\u5b89\u88c5\u7a0b\u5e8f\u5e76\u6dfb\u52a0\u684c\u9762\u5feb\u6377\u65b9\u5f0f\u3002<\/li>\n<li><strong>AutoHotkey<\/strong>\uff1a\u4e00\u4e2a\u5f3a\u5927\u7684\u811a\u672c\u8bed\u8a00\uff0c\u53ef\u4ee5\u7528\u6765\u7f16\u5199\u81ea\u52a8\u5316\u811a\u672c\uff0c\u5305\u62ec\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\u7684\u811a\u672c\u3002<\/li>\n<\/ol>\n<p><p>\u8fd9\u4e9b\u5de5\u5177\u63d0\u4f9b\u4e86\u66f4\u591a\u7684\u5b9a\u5236\u9009\u9879\u548c\u9ad8\u7ea7\u529f\u80fd\uff0c\u9002\u7528\u4e8e\u9700\u8981\u590d\u6742\u5b89\u88c5\u548c\u914d\u7f6e\u7684Python\u9879\u76ee\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5c06Python\u811a\u672c\u6dfb\u52a0\u5230\u684c\u9762\u4e0a\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u5305\u62ec\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\u3001\u76f4\u63a5\u4fdd\u5b58\u811a\u672c\u6587\u4ef6\u3001\u5b9a\u5236\u56fe\u6807\u3001\u4f7f\u7528Python\u811a\u672c\u81ea\u52a8\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\u3001\u4f7f\u7528PyInstaller\u6253\u5305\u811a\u672c\u4ee5\u53ca\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u4f18\u70b9\u548c\u9002\u7528\u573a\u666f\uff0c\u9009\u62e9\u9002\u5408\u4f60\u9700\u6c42\u7684\u65b9\u6cd5\u53ef\u4ee5\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u548c\u7528\u6237\u4f53\u9a8c\u3002\u5e0c\u671b\u672c\u6587\u80fd\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u5c06Python\u811a\u672c\u6dfb\u52a0\u5230\u684c\u9762\u4e0a\uff0c\u5e76\u63d0\u9ad8\u4f60\u7684\u5f00\u53d1\u548c\u4f7f\u7528\u4f53\u9a8c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u6211\u7684\u7535\u8111\u4e0a\u5b89\u88c5Python\u5e76\u521b\u5efa\u684c\u9762\u5feb\u6377\u65b9\u5f0f\uff1f<\/strong><br \/>\u8981\u5728\u7535\u8111\u4e0a\u5b89\u88c5Python\u5e76\u5728\u684c\u9762\u4e0a\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\uff0c\u9996\u5148\u9700\u8981\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff0c\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u7a0b\u5e8f\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u7cfb\u7edf\u901a\u5e38\u4f1a\u5728\u5f00\u59cb\u83dc\u5355\u4e2d\u521b\u5efaPython\u7684\u5feb\u6377\u65b9\u5f0f\u3002\u4e3a\u4e86\u5728\u684c\u9762\u4e0a\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\uff0c\u53ef\u4ee5\u53f3\u952e\u70b9\u51fb\u5f00\u59cb\u83dc\u5355\u4e2d\u7684Python\u56fe\u6807\uff0c\u9009\u62e9\u201c\u53d1\u9001\u5230\u201d\u9009\u9879\u4e2d\u7684\u201c\u684c\u9762(\u521b\u5efa\u5feb\u6377\u65b9\u5f0f)\u201d\u5373\u53ef\u3002\u8fd9\u6837\uff0c\u60a8\u5c31\u53ef\u4ee5\u65b9\u4fbf\u5730\u4ece\u684c\u9762\u542f\u52a8Python\u3002<\/p>\n<p><strong>Python\u684c\u9762\u5feb\u6377\u65b9\u5f0f\u7684\u521b\u5efa\u8fc7\u7a0b\u662f\u5426\u4f1a\u56e0\u64cd\u4f5c\u7cfb\u7edf\u800c\u5f02\uff1f<\/strong><br \/>\u786e\u5b9e\uff0c\u521b\u5efaPython\u684c\u9762\u5feb\u6377\u65b9\u5f0f\u7684\u8fc7\u7a0b\u53ef\u80fd\u4f1a\u56e0\u64cd\u4f5c\u7cfb\u7edf\u800c\u6709\u6240\u4e0d\u540c\u3002\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u53f3\u952e\u70b9\u51fb\u7a0b\u5e8f\u56fe\u6807\u5e76\u9009\u62e9\u201c\u53d1\u9001\u5230\u684c\u9762\u201d\u6765\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\u3002\u800c\u5728MacOS\u4e2d\uff0c\u53ef\u4ee5\u5c06Python\u5e94\u7528\u7a0b\u5e8f\u62d6\u653e\u5230\u684c\u9762\u4e0a\uff0c\u6216\u8005\u4f7f\u7528Finder\u521b\u5efa\u522b\u540d\u3002Linux\u7528\u6237\u901a\u5e38\u53ef\u4ee5\u5728\u5e94\u7528\u83dc\u5355\u4e2d\u627e\u5230Python\uff0c\u53f3\u952e\u70b9\u51fb\u5e76\u9009\u62e9\u201c\u6dfb\u52a0\u5230\u684c\u9762\u201d\u9009\u9879\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u7f16\u5199\u4ee3\u7801\u5e76\u76f4\u63a5\u5728\u684c\u9762\u4e0a\u8fd0\u884c\uff1f<\/strong><br \/>\u4e3a\u4e86\u5728\u684c\u9762\u4e0a\u76f4\u63a5\u8fd0\u884cPython\u4ee3\u7801\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\uff08\u5982Notepad++\u6216VS Code\uff09\u521b\u5efa\u4e00\u4e2a\u4ee5\u201c.py\u201d\u7ed3\u5c3e\u7684Python\u6587\u4ef6\uff0c\u5e76\u5c06\u5176\u4fdd\u5b58\u5230\u684c\u9762\u3002\u786e\u4fdd\u5728\u6587\u4ef6\u4e2d\u7f16\u5199\u6709\u6548\u7684Python\u4ee3\u7801\u3002\u63a5\u7740\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5728\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\u6216\u7ec8\u7aef\uff08Mac\/Linux\uff09\u4e2d\u5bfc\u822a\u5230\u684c\u9762\u5e76\u8f93\u5165\u201cpython \u6587\u4ef6\u540d.py\u201d\u6765\u8fd0\u884c\u8be5\u6587\u4ef6\u3002\u6b64\u5916\uff0c\u60a8\u8fd8\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u684c\u9762\u5feb\u6377\u65b9\u5f0f\uff0c\u76f4\u63a5\u6307\u5411\u8be5Python\u6587\u4ef6\uff0c\u4ee5\u4fbf\u66f4\u65b9\u4fbf\u5730\u6267\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u6dfb\u52a0\u5230\u684c\u9762\u4e0a\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u5feb\u6377\u65b9\u5f0f\u521b\u5efa\u3001\u811a\u672c\u6587\u4ef6\u4fdd\u5b58\u3001\u56fe\u6807\u5b9a\u5236\u7b49\u3002 \u521b\u5efa\u5feb\u6377\u65b9\u5f0f\u662f\u4e00\u79cd\u6700\u5e38\u89c1\u7684 [&hellip;]","protected":false},"author":3,"featured_media":1049750,"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\/1049739"}],"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=1049739"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1049739\/revisions"}],"predecessor-version":[{"id":1049754,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1049739\/revisions\/1049754"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1049750"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1049739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1049739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1049739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}