{"id":1035383,"date":"2024-12-31T11:58:20","date_gmt":"2024-12-31T03:58:20","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1035383.html"},"modified":"2024-12-31T11:58:22","modified_gmt":"2024-12-31T03:58:22","slug":"%e5%a6%82%e4%bd%95%e8%bf%9b%e5%8e%bbpython%e7%9a%84shell%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1035383.html","title":{"rendered":"\u5982\u4f55\u8fdb\u53bbPython\u7684shell\u5f00\u53d1\u73af\u5883"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/47da5c27-7aaa-41ec-b01e-38afa2292ad7.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"\u5982\u4f55\u8fdb\u53bbPython\u7684shell\u5f00\u53d1\u73af\u5883\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u8fdb\u5165Python\u7684shell\u5f00\u53d1\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>\u8fdb\u5165Python\u7684shell\u5f00\u53d1\u73af\u5883\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u5728\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165\u201cpython\u201d\u6216\u201cpython3\u201d\uff0c\u5373\u53ef\u8fdb\u5165\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883\u3002\u5728\u8fd9\u4e2a\u73af\u5883\u4e2d\uff0c\u53ef\u4ee5\u76f4\u63a5\u8f93\u5165Python\u4ee3\u7801\u5e76\u5b9e\u65f6\u67e5\u770b\u7ed3\u679c\u3002<strong>\u542f\u52a8\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u3001\u8f93\u5165\u201cpython\u201d\u6216\u201cpython3\u201d\u547d\u4ee4\u3001\u786e\u8ba4\u8fdb\u5165\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883<\/strong>\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u8fdb\u5165Python\u7684shell\u5f00\u53d1\u73af\u5883\uff0c\u5e76\u89e3\u91ca\u5982\u4f55\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u542f\u52a8\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>Windows\u7cfb\u7edf<\/strong><\/p>\n<p>\u5728Windows\u7cfb\u7edf\u4e0a\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u5f0f\u542f\u52a8\u547d\u4ee4\u63d0\u793a\u7b26\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u4f7f\u7528\u5feb\u6377\u952e\u201cWin + R\u201d\u6253\u5f00\u8fd0\u884c\u7a97\u53e3\uff0c\u8f93\u5165\u201ccmd\u201d\u5e76\u6309\u56de\u8f66\u952e\u5373\u53ef\u542f\u52a8\u547d\u4ee4\u63d0\u793a\u7b26\u3002<\/li>\n<li>\u5728\u201c\u5f00\u59cb\u201d\u83dc\u5355\u4e2d\u641c\u7d22\u201ccmd\u201d\u6216\u201c\u547d\u4ee4\u63d0\u793a\u7b26\u201d\uff0c\u5e76\u70b9\u51fb\u7ed3\u679c\u9879\u5373\u53ef\u542f\u52a8\u3002<\/li>\n<li>\u5728\u4efb\u610f\u6587\u4ef6\u5939\u4e2d\u6309\u4f4fShift\u952e\u5e76\u53f3\u952e\u70b9\u51fb\u7a7a\u767d\u5904\uff0c\u7136\u540e\u9009\u62e9\u201c\u5728\u6b64\u5904\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u201d\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>macOS\u7cfb\u7edf<\/strong><\/p>\n<p>\u5728macOS\u7cfb\u7edf\u4e0a\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u5f0f\u542f\u52a8\u7ec8\u7aef\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u4f7f\u7528\u5feb\u6377\u952e\u201cCommand + \u7a7a\u683c\u201d\u6253\u5f00\u805a\u7126\u641c\u7d22\uff0c\u8f93\u5165\u201c\u7ec8\u7aef\u201d\u5e76\u6309\u56de\u8f66\u952e\u5373\u53ef\u542f\u52a8\u7ec8\u7aef\u3002<\/li>\n<li>\u5728\u201c\u5e94\u7528\u7a0b\u5e8f\u201d\u6587\u4ef6\u5939\u4e2d\u627e\u5230\u201c\u5b9e\u7528\u5de5\u5177\u201d\uff0c\u7136\u540e\u70b9\u51fb\u201c\u7ec8\u7aef\u201d\u5e94\u7528\u7a0b\u5e8f\u5373\u53ef\u542f\u52a8\u3002<\/li>\n<li>\u5728\u201c\u542f\u52a8\u53f0\u201d\u4e2d\u641c\u7d22\u201c\u7ec8\u7aef\u201d\uff0c\u5e76\u70b9\u51fb\u7ed3\u679c\u9879\u5373\u53ef\u542f\u52a8\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Linux\u7cfb\u7edf<\/strong><\/p>\n<p>\u5728Linux\u7cfb\u7edf\u4e0a\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u5f0f\u542f\u52a8\u7ec8\u7aef\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u4f7f\u7528\u5feb\u6377\u952e\u201cCtrl + Alt + T\u201d\u53ef\u4ee5\u76f4\u63a5\u542f\u52a8\u7ec8\u7aef\u3002<\/li>\n<li>\u5728\u684c\u9762\u73af\u5883\u7684\u5e94\u7528\u7a0b\u5e8f\u83dc\u5355\u4e2d\u627e\u5230\u201c\u7ec8\u7aef\u201d\u6216\u201cTerminal\u201d\uff0c\u5e76\u70b9\u51fb\u5373\u53ef\u542f\u52a8\u3002<\/li>\n<li>\u5728\u6587\u4ef6\u7ba1\u7406\u5668\u4e2d\u53f3\u952e\u70b9\u51fb\u7a7a\u767d\u5904\uff0c\u9009\u62e9\u201c\u5728\u7ec8\u7aef\u4e2d\u6253\u5f00\u201d\u5373\u53ef\u542f\u52a8\u7ec8\u7aef\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u8f93\u5165\u201cpython\u201d\u6216\u201cpython3\u201d\u547d\u4ee4<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>Windows\u7cfb\u7edf<\/strong><\/p>\n<p>\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165\u201cpython\u201d\u6216\u201cpython3\u201d\u5e76\u6309\u56de\u8f66\u952e\uff0c\u5982\u679c\u7cfb\u7edf\u4e2d\u5df2\u7ecf\u5b89\u88c5\u4e86Python\uff0c\u5c06\u4f1a\u8fdb\u5165Python\u7684\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883\u3002\u901a\u5e38\uff0c\u8f93\u5165\u201cpython\u201d\u4f1a\u542f\u52a8\u7cfb\u7edf\u9ed8\u8ba4\u7684Python\u7248\u672c\uff0c\u800c\u8f93\u5165\u201cpython3\u201d\u5219\u4f1a\u542f\u52a8Python 3.x\u7248\u672c\u3002\u5efa\u8bae\u4f7f\u7528\u201cpython3\u201d\u547d\u4ee4\uff0c\u4ee5\u786e\u4fdd\u4f7f\u7528\u7684\u662fPython 3.x\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>macOS\u7cfb\u7edf<\/strong><\/p>\n<p>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u201cpython\u201d\u6216\u201cpython3\u201d\u5e76\u6309\u56de\u8f66\u952e\uff0c\u540c\u6837\u53ef\u4ee5\u8fdb\u5165Python\u7684\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883\u3002macOS\u7cfb\u7edf\u901a\u5e38\u9884\u88c5\u4e86Python 2.x\u7248\u672c\uff0c\u6240\u4ee5\u5efa\u8bae\u4f7f\u7528\u201cpython3\u201d\u547d\u4ee4\uff0c\u4ee5\u786e\u4fdd\u4f7f\u7528\u7684\u662fPython 3.x\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Linux\u7cfb\u7edf<\/strong><\/p>\n<p>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u201cpython\u201d\u6216\u201cpython3\u201d\u5e76\u6309\u56de\u8f66\u952e\uff0c\u5373\u53ef\u8fdb\u5165Python\u7684\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883\u3002\u5927\u591a\u6570Linux\u53d1\u884c\u7248\u9ed8\u8ba4\u9884\u88c5\u4e86Python 2.x\u548cPython 3.x\u7248\u672c\uff0c\u5efa\u8bae\u4f7f\u7528\u201cpython3\u201d\u547d\u4ee4\uff0c\u4ee5\u786e\u4fdd\u4f7f\u7528\u7684\u662fPython 3.x\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u786e\u8ba4\u8fdb\u5165\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883<\/p>\n<\/p>\n<p><p>\u6210\u529f\u8f93\u5165\u201cpython\u201d\u6216\u201cpython3\u201d\u547d\u4ee4\u540e\uff0c\u7cfb\u7edf\u5c06\u663e\u793aPython\u7684\u7248\u672c\u4fe1\u606f\u548c\u7248\u6743\u58f0\u660e\uff0c\u5e76\u8fdb\u5165\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883\u3002\u5728\u8be5\u73af\u5883\u4e2d\uff0c\u63d0\u793a\u7b26\u5c06\u53d8\u4e3a\u201c&gt;&gt;&gt;\u201d\uff0c\u8868\u793a\u53ef\u4ee5\u8f93\u5165Python\u4ee3\u7801\u5e76\u5b9e\u65f6\u67e5\u770b\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u5728\u4ea4\u4e92\u5f0f\u73af\u5883\u4e2d\u6267\u884cPython\u4ee3\u7801<\/p>\n<\/p>\n<p><p>\u8fdb\u5165Python\u7684\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883\u540e\uff0c\u53ef\u4ee5\u76f4\u63a5\u8f93\u5165Python\u4ee3\u7801\u5e76\u6309\u56de\u8f66\u952e\u6267\u884c\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801\u5e76\u67e5\u770b\u7ed3\u679c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">&gt;&gt;&gt; print(&quot;Hello, World!&quot;)<\/p>\n<p>Hello, World!<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6b64\u65f6\uff0c\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883\u5c06\u8f93\u51fa\u201cHello, World!\u201d\u3002\u53ef\u4ee5\u8f93\u5165\u66f4\u591a\u7684Python\u4ee3\u7801\u6765\u63a2\u7d22Python\u7684\u529f\u80fd\u548c\u7279\u6027\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u9000\u51fa\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883<\/p>\n<\/p>\n<p><p>\u8981\u9000\u51faPython\u7684\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8f93\u5165exit()\u547d\u4ee4<\/strong><\/p>\n<p>\u5728\u63d0\u793a\u7b26\u201c&gt;&gt;&gt;\u201d\u5904\u8f93\u5165\u201cexit()\u201d\u5e76\u6309\u56de\u8f66\u952e\uff0c\u5373\u53ef\u9000\u51fa\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883\u5e76\u8fd4\u56de\u5230\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u5feb\u6377\u952eCtrl + D<\/strong><\/p>\n<p>\u5728macOS\u548cLinux\u7cfb\u7edf\u4e0a\uff0c\u53ef\u4ee5\u6309\u201cCtrl + D\u201d\u5feb\u6377\u952e\u9000\u51fa\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883\u3002\u5728Windows\u7cfb\u7edf\u4e0a\uff0c\u6309\u201cCtrl + Z\u201d\u5e76\u6309\u56de\u8f66\u952e\u4e5f\u53ef\u4ee5\u9000\u51fa\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u76f4\u63a5\u5173\u95ed\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26<\/strong><\/p>\n<p>\u76f4\u63a5\u5173\u95ed\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u7a97\u53e3\uff0c\u4e5f\u53ef\u4ee5\u9000\u51faPython\u7684\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u65e0\u6cd5\u8bc6\u522bpython\u547d\u4ee4<\/strong><\/p>\n<p>\u5982\u679c\u5728\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165\u201cpython\u201d\u6216\u201cpython3\u201d\u547d\u4ee4\u540e\uff0c\u51fa\u73b0\u201c\u65e0\u6cd5\u8bc6\u522b\u201d\u6216\u201c\u4e0d\u662f\u5185\u90e8\u6216\u5916\u90e8\u547d\u4ee4\u201d\u7684\u9519\u8bef\u4fe1\u606f\uff0c\u53ef\u80fd\u662f\u56e0\u4e3aPython\u672a\u6b63\u786e\u5b89\u88c5\u6216\u672a\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u89e3\u51b3\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u786e\u8ba4\u5df2\u6b63\u786e\u5b89\u88c5Python\uff0c\u53ef\u4ee5\u4ecePython\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/www.python.org\/%EF%BC%89%E4%B8%8B%E8%BD%BD%E5%B9%B6%E5%AE%89%E8%A3%85%E6%9C%80%E6%96%B0%E7%89%88%E6%9C%AC%E7%9A%84Python%E3%80%82\">https:\/\/www.python.org\/\uff09\u4e0b\u8f7d\u5e76\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684Python\u3002<\/a><\/li>\n<li>\u786e\u8ba4\u5df2\u5c06Python\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\uff0c\u5728\u5b89\u88c5Python\u65f6\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u6216\u624b\u52a8\u6dfb\u52a0Python\u7684\u5b89\u88c5\u8def\u5f84\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u7248\u672c\u51b2\u7a81\u95ee\u9898<\/strong><\/p>\n<p>\u5982\u679c\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86\u591a\u4e2a\u7248\u672c\u7684Python\uff0c\u53ef\u80fd\u4f1a\u51fa\u73b0\u7248\u672c\u51b2\u7a81\u95ee\u9898\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u6cd5\u89e3\u51b3\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u660e\u786e\u4f7f\u7528\u201cpython3\u201d\u547d\u4ee4\u542f\u52a8Python 3.x\u7248\u672c\uff0c\u4ee5\u907f\u514d\u4f7f\u7528\u9ed8\u8ba4\u7684Python 2.x\u7248\u672c\u3002<\/li>\n<li>\u4f7f\u7528\u865a\u62df\u73af\u5883\uff08virtual environment\uff09\u6765\u7ba1\u7406\u4e0d\u540c\u9879\u76ee\u7684\u4f9d\u8d56\u548cPython\u7248\u672c\uff0c\u786e\u4fdd\u6bcf\u4e2a\u9879\u76ee\u4f7f\u7528\u7279\u5b9a\u7248\u672c\u7684Python\u548c\u5e93\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u53ef\u4ee5\u8f7b\u677e\u8fdb\u5165Python\u7684shell\u5f00\u53d1\u73af\u5883\uff0c\u5e76\u5f00\u59cb\u7f16\u5199\u548c\u8c03\u8bd5Python\u4ee3\u7801\u3002Python\u7684\u4ea4\u4e92\u5f0f\u5f00\u53d1\u73af\u5883\u975e\u5e38\u9002\u5408\u521d\u5b66\u8005\u5b66\u4e60\u548c\u5b9e\u9a8c\uff0c\u4e5f\u4e3a\u5f00\u53d1\u8005\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4fbf\u6377\u7684\u6d4b\u8bd5\u548c\u8c03\u8bd5\u5de5\u5177\u3002\u5728\u540e\u7eed\u7684\u5b66\u4e60\u4e2d\uff0c\u53ef\u4ee5\u8fdb\u4e00\u6b65\u63a2\u7d22Python\u7684\u4e30\u5bcc\u529f\u80fd\u548c\u5f3a\u5927\u5e93\uff0c\u63d0\u5347\u7f16\u7a0b\u6280\u80fd\u548c\u5f00\u53d1\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5b89\u88c5Python\u4ee5\u4fbf\u4f7f\u7528Shell\u5f00\u53d1\u73af\u5883\uff1f<\/strong><br \/>\u8981\u5728\u4f60\u7684\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5Python\uff0c\u53ef\u4ee5\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff08python.org\uff09\u5e76\u4e0b\u8f7d\u9002\u5408\u4f60\u64cd\u4f5c\u7cfb\u7edf\u7684\u7248\u672c\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u6216\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python<\/code>\u6216<code>python3<\/code>\u6765\u542f\u52a8Python\u7684Shell\u5f00\u53d1\u73af\u5883\u3002\u786e\u4fdd\u4f60\u7684\u73af\u5883\u53d8\u91cf\u5df2\u6b63\u786e\u8bbe\u7f6e\uff0c\u4ee5\u4fbf\u5728\u4efb\u610f\u76ee\u5f55\u4e2d\u90fd\u80fd\u8c03\u7528Python\u3002<\/p>\n<p><strong>\u5728Python Shell\u4e2d\u53ef\u4ee5\u6267\u884c\u54ea\u4e9b\u7c7b\u578b\u7684\u4ee3\u7801\uff1f<\/strong><br \/>\u5728Python Shell\u4e2d\uff0c\u4f60\u53ef\u4ee5\u6267\u884c\u7b80\u5355\u7684Python\u8bed\u53e5\u3001\u51fd\u6570\u8c03\u7528\u3001\u53d8\u91cf\u8d4b\u503c\u4ee5\u53ca\u5404\u79cd\u5185\u7f6e\u51fd\u6570\u3002\u5b83\u975e\u5e38\u9002\u5408\u8fdb\u884c\u5feb\u901f\u6d4b\u8bd5\u548c\u8c03\u8bd5\u4ee3\u7801\u7247\u6bb5\u3002\u4f60\u8fd8\u53ef\u4ee5\u4f7f\u7528Shell\u4e2d\u7684\u5e2e\u52a9\u547d\u4ee4\uff08\u5982<code>help()<\/code>\uff09\u6765\u83b7\u53d6\u6709\u5173\u6a21\u5757\u548c\u51fd\u6570\u7684\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<p><strong>\u5982\u4f55\u9000\u51faPython Shell\u5f00\u53d1\u73af\u5883\uff1f<\/strong><br \/>\u8981\u9000\u51faPython Shell\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>exit()<\/code>\u547d\u4ee4\u6216\u7b80\u5355\u5730\u6309\u4e0b<code>Ctrl + Z<\/code>\uff08\u5728Windows\u4e0a\uff09\u6216<code>Ctrl + D<\/code>\uff08\u5728Linux\u548cmacOS\u4e0a\uff09\u3002\u8fd9\u5c06\u7ec8\u6b62\u5f53\u524d\u4f1a\u8bdd\u5e76\u8fd4\u56de\u5230\u64cd\u4f5c\u7cfb\u7edf\u7684\u547d\u4ee4\u884c\u754c\u9762\u3002\u786e\u4fdd\u5728\u9000\u51fa\u4e4b\u524d\u4fdd\u5b58\u4f60\u9700\u8981\u7684\u4efb\u4f55\u53d8\u91cf\u6216\u6570\u636e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u8fdb\u5165Python\u7684shell\u5f00\u53d1\u73af\u5883 \u8fdb\u5165Python\u7684shell\u5f00\u53d1\u73af\u5883\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u5728\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26 [&hellip;]","protected":false},"author":3,"featured_media":1035394,"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\/1035383"}],"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=1035383"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1035383\/revisions"}],"predecessor-version":[{"id":1035396,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1035383\/revisions\/1035396"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1035394"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1035383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1035383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1035383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}