随笔分类 -  .Python

摘要:import osimport os.pathrootdir="/Volumes/extend/test" #要查找的目录result = []def findSame(parent,filenames,category): for filename in filenames: ... 阅读全文
posted @ 2016-01-23 23:39 Liren 阅读(2634) 评论(0) 推荐(0)
摘要:[代码] 用可选和命名参数定义和调用函数 用str强制转换任意值为字符串形式 用getattr动态得到函数和其它属性的引用 扩展列表解析语法实现列表过滤 识别and-or技巧并安全地使用它 使用lambda 函数 阅读全文
posted @ 2009-01-09 16:12 Liren 阅读(248) 评论(0) 推荐(0)
摘要:[代码] 阅读全文
posted @ 2009-01-08 16:09 Liren 阅读(284) 评论(0) 推荐(0)