擅长:python、mysql、java
<p>以下是Python文档中缺少的部分:</p>
<p><a href="http://docs.python.org/2/library/os.html#os.walk" rel="nofollow">http://docs.python.org/2/library/os.html#os.walk</a></p>
<blockquote>
<p>Note that the names in the lists contain no path components. To get a full path (which begins with <em>top</em>) to a file or directory in <em>dirpath</em>, do <code>os.path.join(dirpath, name)</code>.</p>
</blockquote>
<p>现在您只需迭代<code>files</code>,这是没有任何路径信息的裸文件名。添加路径信息,您应该停止获取那些“文件未找到”错误。在</p>