recursive file editing

Josiah Carlson jcarlson at uci.edu
Mon Apr 5 19:33:37 EDT 2004


>>for thing in os.walk('mydir'):
>>     filehandle = file(thing, 'r+')
> 
> 
> I'm such a newbe I can't get it to work. Here is an example:

Nah, it's my fault.  I thought you were having issues with the file open 
mode needing to be a string.  I forgot the format of os.walk iteration.

Good to hear that you now have something that works the way you want it.

  - Josiah



More information about the Python-list mailing list