摘要: python shutil,os模块下的常用函数os.rename(file1,file2) 重命名shutil.copyfile(src,dst) 复制文件shutil.move(src,dst) 移动文件os.listdir("") 显示路径下文件列表os.exists("") 判断文件是否存在os.splittext(filename) 解析文件名glob.glob("xx") 列出路径下所有xx的文件、os.getcwd() 获得当前工作目录遍历目录:import difflibimport os,os.pathdef Vis 阅读全文
posted @ 2013-11-01 15:18 huangxiaohen 阅读(201) 评论(0) 推荐(0) 编辑