{"id":889,"date":"2019-10-14T21:22:44","date_gmt":"2019-10-14T13:22:44","guid":{"rendered":"http:\/\/vip.fxxkpython.com\/?p=889"},"modified":"2020-02-15T22:02:04","modified_gmt":"2020-02-15T14:02:04","slug":"python%e5%bf%ab%e9%80%9f%e5%85%a5%e9%97%a8-%e6%80%8e%e4%b9%88%e4%bd%bf%e7%94%a8-python-%e6%9d%a5%e6%93%8d%e4%bd%9c%e4%bd%a0%e7%9a%84%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/vip.fxxkpython.com\/?p=889","title":{"rendered":"Python\u5feb\u901f\u5165\u95e8 | \u600e\u4e48\u4f7f\u7528 Python \u6765\u64cd\u4f5c\u4f60\u7684\u6587\u4ef6"},"content":{"rendered":"\n<p>\u5728\u65e5\u5e38\u5de5\u4f5c\u4e2d\uff0c\u60f3\u5fc5\u4f60\u5bf9\u6587\u4ef6\u7684\u64cd\u4f5c\u5f88\u662f\u9891\u7e41\uff0c\u6709\u5f88\u591a\u91cd\u590d\u6027\u7684\u64cd\u4f5c\uff0c\u5176\u5b9e\u90fd\u53ef\u4ee5\u4f7f\u7528 Python \u641e\u5b9a\uff0c\u9664\u6b64\u4e4b\u5916\uff0c\u5728\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\uff0c\u5e38\u5e38\u4e5f\u4f1a\u4f7f\u7528\u5230\u6587\u4ef6\uff0c\u6bd4\u5982\u5b58\u50a8\u4e0b\u8f7d\u5230\u7684\u6570\u636e\uff0c\u8bfb\u53d6\u6587\u4ef6\u4e2d\u7684\u5185\u5bb9\u7b49\u3002\u90a3\u4e48\u8fd9\u4e00\u7bc7\uff0c\u6211\u4eec\u5c31\u6765\u597d\u597d\u7684\u4e86\u89e3\u4e00\u4e0b\uff0c\u600e\u4e48\u4f7f\u7528 Python \u6765\u64cd\u4f5c\u4f60\u7684\u6587\u4ef6\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u5728\u64cd\u4f5c\u6587\u4ef6\u7684\u65f6\u5019\uff0c\u65e0\u975e\u5c31\u662f\u8fd9\u4e48\u51e0\u79cd\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><strong>\u76ee\u5f55\uff1a<\/strong><\/p><p>\u521b\u5efa\u6587\u4ef6\u76ee\u5f55<\/p><p>\u8fdb\u5165\u6587\u4ef6\u76ee\u5f55<\/p><p>\u91cd\u547d\u540d\u6587\u4ef6\u76ee\u5f55<\/p><p>\u5220\u9664\u6587\u4ef6\u76ee\u5f55<\/p><p>\u83b7\u53d6\u6587\u4ef6\u76ee\u5f55\u8def\u5f84<\/p><p><strong> \u6587\u4ef6\uff1a<\/strong><\/p><p>\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9<\/p><p>\u5199\u5165\u5185\u5bb9\u8fdb\u6587\u4ef6<\/p><p>\u6587\u4ef6\u7684\u4f7f\u7528\u6743\u9650<\/p><p>\u5173\u95ed\u6587\u4ef6<\/p><p>\u91cd\u547d\u540d\u6587\u4ef6<\/p><p>\u5220\u9664\u6587\u4ef6<\/p><p><\/p><\/blockquote>\n\n\n\n<p>ok\uff0c\u54b1\u4eec\u6328\u4e2a\u6765\u7528 Python \u5b9e\u73b0\u4e00\u4e0b\uff0c\u5c06\u4f60\u624b\u5934\u4e0a\u64cd\u4f5c\u7684\u4e8b\u60c5\uff0c\u81ea\u5df1\u4f7f\u7528\u7f16\u7a0b\u6765\u8ba9\u5b83\u5e2e\u4f60\u64cd\u4f5c\uff0c\u8fd9\u672c\u8eab\u5c31\u662f\u4e00\u4ef6\u5f88<div style=\"text-align:center;border:1px dashed #FF9A9A;padding:8px;margin:10px auto;color:#FF6666;\">\u672c\u6587\u9690\u85cf\u5185\u5bb9 <a href=\"https:\/\/vip.fxxkpython.com\/wp-login.php?redirect_to=https%3A%2F%2Fvip.fxxkpython.com%2F%3Fp%3D889\">\u767b\u9646<\/a> \u540e\u624d\u53ef\u4ee5\u6d4f\u89c8<\/div>\u5982\u679c\u4f60\u60f3\u8bfb\u53d6\u4e00\u4e2a\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528 os.listdir(&#8220;\u8def\u5f84&#8221;) \u6765\u83b7\u53d6\u8be5\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u540d\uff0c\u518d\u901a\u8fc7 open \u6253\u5f00\u6587\u4ef6\u5c31\u53ef\u4ee5\u4e86\u3002\u5f53\u7136\uff0c\u5173\u4e8e\u6587\u4ef6\u7684 open \uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u6211\u4eec\u4e4b\u524d\u8bf4\u7684 with \u8bed\u53e5\u66f4\u52a0\u65b9\u4fbf\u64cd\u4f5c\uff1a  <a href=\"https:\/\/vip.fxxkpython.com\/?p=525\">\u725b\u903c\u7684 with \u8bed\u53e5&nbsp;&nbsp;<\/a><\/p>\n\n\n\n<p>ok\uff0c\u4ee5\u4e0a\u5c31\u662f\u4f7f\u7528 Python \u5bf9\u6587\u4ef6\u7684\u5e38\u7528\u64cd\u4f5c\u4e86\uff0c\u4e0b\u7bc7\u89c1\uff0cpeace\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u65e5\u5e38\u5de5\u4f5c\u4e2d\uff0c\u60f3\u5fc5\u4f60\u5bf9\u6587\u4ef6\u7684\u64cd\u4f5c\u5f88\u662f\u9891\u7e41\uff0c\u6709\u5f88\u591a\u91cd\u590d\u6027\u7684\u64cd\u4f5c\uff0c\u5176\u5b9e\u90fd\u53ef\u4ee5\u4f7f\u7528 Python \u641e\u5b9a\uff0c\u9664\u6b64\u4e4b\u5916\uff0c\u5728\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\uff0c\u5e38\u5e38\u4e5f\u4f1a\u4f7f\u7528\u5230\u6587\u4ef6\uff0c\u6bd4\u5982\u5b58\u50a8\u4e0b\u8f7d\u5230\u7684\u6570\u636e\uff0c\u8bfb\u53d6\u6587\u4ef6\u4e2d\u7684\u5185\u5bb9\u7b49\u3002\u90a3\u4e48\u8fd9\u4e00\u7bc7\uff0c\u6211\u4eec\u5c31\u6765\u597d\u597d\u7684\u4e86\u89e3\u4e00\u4e0b\uff0c\u600e\u4e48\u4f7f\u7528 Python \u6765\u64cd\u4f5c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"tags":[111,114,112,19,20,110],"_links":{"self":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/889"}],"collection":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=889"}],"version-history":[{"count":4,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/889\/revisions"}],"predecessor-version":[{"id":3869,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/889\/revisions\/3869"}],"wp:attachment":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=889"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=889"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}