#coding:utf-8
import os
dirname = 'D:\\'
li=[f for f in os.listdir(dirname)]
print li
for f in li:
if os.path.isfile(os.path.join(dirname,f)):
print os.path.join(dirname,f)
import os
dirname = 'D:\\'
li=[f for f in os.listdir(dirname)]
print li
for f in li:
if os.path.isfile(os.path.join(dirname,f)):
print os.path.join(dirname,f)