listonly input('list only?'='yvisitor replacevisitor(sys argv[ ]sys argv[ ]listonlyif listonly or input('proceed with changes?'=' 'visitor run(startdir=sys argv[ ]action 'changedif not listonly else 'foundprint('visited % filesvisitor fcountprint(action'% files:len(visitor changed)for fname in visitor changedprint(fnameto run this script over directory treerun the following sort of command line with appropriate "fromand "tostrings on my shockingly underpowered netbook machinedoing this on -file tree and changing files along the way takes roughly three seconds of real clock time when the system isn' particularly busy :\pp \toolsvisitor_replace py :\temp\pp \examples pp pp list only? visited files found filesc:\temp\pp \examples\readme-root txt :\temp\pp \examples\pp \echoenvironment pyw :\temp\pp \examples\pp \launcher py more matching filenames omitted :\pp \toolsvisitor_replace py :\temp\pp \examples pp pp list only? proceed with changes? visited files changed filesc:\temp\pp \examples\readme-root txt :\temp\pp \examples\pp \echoenvironment pyw :\temp\pp \examples\pp \launcher py more changed filenames omitted :\pp \toolsvisitor_replace py :\temp\pp \examples pp pp list only? proceed with changes? visited files changed filesnaturallywe can also check our work by running the visitor script (and searchvisitor superclass) :\pp \toolsvisitor py :\temp\pp \examples pp found in filesvisited :\pp \toolsvisitor py :\temp\pp \examples pp :\temp\pp \examples\readme-root txt has pp :\temp\pp \examples\pp \echoenvironment pyw has pp :\temp\pp \examples\pp \launcher py has pp more matching filenames omitted found in filesvisited visitorwalking directories "++