|
发表于 2016-11-9 09:12:41
|
显示全部楼层
>>> os.listdir('D:')
['$360Section', '$RECYCLE.BIN', '360Downloads', 'acad.err', 'defrag.dat', 'Document', 'Documents', 'download', 'Favorites', 'FFOutput', 'GPASetup',, 'kankan', 'lastools', 'messages.xml', 'MSOCache', 'MyDownloads', 'opt', 'pagefile.sys', 'Program Files', 'Program Files (x86)', 'QLDownload', 'software', 'StormMedia', 'System Volume Information', 'tools', 'Users', '~$\xb0\xd7\xc6\xa4\xca\xe9.doc', '\xc6\xe4\xcb\xfb', '\xd0\xc2\xbd\xa8\xce\xc4\xbc\xfe\xbc\xd0', '\xd1\xb8\xc0\xd7\xcf\xc2\xd4\xd8']
这样就可以了,不知道你为什么那么复杂
>>> |
|