擅长:python、mysql、java
<p>试试这个</p>
<pre><code>path= 'c:/..... this is the path what I get back from an another script'
os.chdir(path)
for files in os.listdir("."):``
if files.endswith(".txt"):
print files
</code></pre>
<p><code>/</code>而不是<code>\</code></p>