why my os.listdir return the same folder?
<p>sory, if my english bad...<br>
i'm trying to get a list of my dir this way:</p>

<pre><code>import os, os.path  

_path = "/opt/local"#this because i use mac
_dir_path = os.listdir(_path)
_tmp_attr = {"name":"","type":""}
_tmp_data =[]

for _dir_name in _dir_path:
   _tmp_attr["name"] = _dir_name
   if os.path.isdir(_path+'/'+_dir_name):
     _tmp_attr["type"] = "Dictionary"
   _tmp_data.append(_tmp_attr)
print _tmp_data  
</code></pre>

<p>but it print only the last directory<br>
    [{'type': 'Dictionary', 'name': 'www'}, {'type': 'Dictionary', 'name': 'www'}, ... ]</p>
