¡@

Home 

python Programming Glossary: pathmatch

how to replace (update) text in a file line by line

http://stackoverflow.com/questions/4778697/how-to-replace-update-text-in-a-file-line-by-line

far... I get fpath from os.walk and I guarantee that the pathmatch var returns correctly fpath os.path.join thisdir filename with.. in f.readlines if ' a href ' in line for test in filelist pathmatch file_match line test if pathmatch is not None repstring filelist.. for test in filelist pathmatch file_match line test if pathmatch is not None repstring filelist test pathmatch print 'old line..