unicode
# -*- coding:utf-8 -*- import os import shutil ins="E:\学习资料" dir=unicode(ins,'utf-8') for root,dirs,files in os.walk(dir): for file in files: print os.path.join(root,file)
unicode
# -*- coding:utf-8 -*- import os import shutil ins="E:\学习资料" dir=unicode(ins,'utf-8') for root,dirs,files in os.walk(dir): for file in files: print os.path.join(root,file)