import os import os.path import shutil def listDir(dirTemp): if None == dirTemp: return global nameList if not os.path.exists(dirTemp): print "file or directory isn't exist" return if os.path.isfile(dirTemp): if dirTemp.find('.wmv') > 0: name…
需求,有一个配置文件test.conf内容如下 backend www1 server 1 server 2 backend www2 server 3 server 4 add [{'backend':'www1','server':'3'}] change [{'backend':'www1','server':'1'},{'backend':'www1','server':'3'}] delete [{'backend':'www1','server':'1'}] 1,自定义函数实现查询功…
>>> for line in reversed(list(open('Today.txt'))): print(line.rstrip())containeritertools DebuggerThis sem’s subjects Python, C++, JavaHTML, CSS, jQuery, JavaScript OS, DBMS, DS, ADA 本文首发于Python黑洞网,博客园同步更新…