摘要: import sysimport osdef pySource(filePath): myFile=os.path.basename(filePath) dir=os.path.dirname(filePath) fileName=os.path.splitext(myFile)[... 阅读全文
posted @ 2015-05-18 15:43 古刹红罗 阅读(1352) 评论(0) 推荐(0) 编辑
摘要: python os.path模块os.path.abspath(path) #返回绝对路径os.path.basename(path) #返回文件名os.path.commonprefix(list) #返回list(多个路径)中,所有path共有的最长的路径。os.path.dirname(pat... 阅读全文
posted @ 2015-05-18 15:16 古刹红罗 阅读(141) 评论(0) 推荐(0) 编辑