{"id":703,"date":"2019-03-29T00:37:37","date_gmt":"2019-03-28T16:37:37","guid":{"rendered":"http:\/\/www.eait.co\/?p=703"},"modified":"2019-04-05T12:42:04","modified_gmt":"2019-04-05T04:42:04","slug":"python%e9%81%8d%e5%8e%86%e6%96%87%e4%bb%b6%e5%a4%b9%ef%bc%8c%e4%bd%9c%e7%94%a8%e5%be%88%e5%a4%a7","status":"publish","type":"post","link":"https:\/\/notes.coremix.net\/?p=703","title":{"rendered":"python\u904d\u5386\u6587\u4ef6\u5939\uff0c\u4f5c\u7528\u5f88\u5927"},"content":{"rendered":"<p>\u4e4b\u524d\u5c31\u60f3\u5199\u4e00\u4e2a\u904d\u5386\u6587\u4ef6\u5939\u7684\u4ee3\u7801\uff0c\u8fd9\u6837\u53ef\u4ee5\u5220\u9664\u5783\u573e\u6587\u4ef6\uff0c\u6587\u4ef6\u5939\u540c\u6b65\uff0c\u6587\u4ef6\u7b5b\u9009\uff0c\u6587\u4ef6\u8fc7\u6ee4\uff0c\u6587\u4ef6\u5206\u7c7b\uff0c\u6587\u4ef6\u641c\u7d22\u6574\u7406\u7b49\u529f\u80fd\uff0c\u5948\u4f55\u65e0\u6cd5\u904d\u5386\u5b50\u6587\u4ef6\u5939\uff0c\u524d\u51e0\u5929\u6298\u817e\u51fa\u6765\u4e86\uff0c\u4eca\u5929\u521a\u597d\u8981\u4ea4\u4f5c\u4e1a\uff0c\u53ef\u4ee5\u8bd5\u8bd5\uff0c\u53ef\u80fd\u6709\u70b9bug\uff0c\u4ee5\u540e\u518d\u8c03\u8bd5\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>import os\r\npaths = 'D:\/'\r\n# dirss = []\r\ndef second_dirs(path,dirs = []):\r\n    for i in os.listdir(path):\r\n        path = path+'\\\\'+i\r\n        dirs.append(path)\r\n        if os.path.isdir(path):\r\n            second_dirs(path, dirs)\r\n    return dirs\r\n\r\n\r\n#\u8c03\u7528\u51fd\u6570\uff0c\u641e\u70b9\u6210\u5c31\u611f\r\nfor i in second_dirs(paths):\r\n    print(i)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u5c31\u60f3\u5199\u4e00\u4e2a\u904d\u5386\u6587\u4ef6\u5939\u7684\u4ee3\u7801\uff0c\u8fd9\u6837\u53ef\u4ee5\u5220\u9664\u5783\u573e\u6587\u4ef6\uff0c\u6587\u4ef6\u5939\u540c\u6b65\uff0c\u6587\u4ef6\u7b5b\u9009\uff0c\u6587\u4ef6\u8fc7\u6ee4\uff0c\u6587\u4ef6\u5206\u7c7b\uff0c\u6587\u4ef6\u641c\u7d22\u6574\u7406\u7b49 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-703","post","type-post","status-publish","format-standard","hentry","category-py"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/posts\/703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=703"}],"version-history":[{"count":1,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/posts\/703\/revisions"}],"predecessor-version":[{"id":704,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/posts\/703\/revisions\/704"}],"wp:attachment":[{"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}