On Wed, 2008-07-09 at 00:00 -0400, Ben Keshet wrote: > oops, my mistake, actually it didn't work... > when I tried: > for x in folders: > print x # print the current folder > filename='Folder/%s/myfile.txt' %x > f=open(filename,'r') > > it says: IOError: [Errno 2] No such file or directory: > 'Folder/1/myfile.txt' >
I believe it's because x is the position marker what you want instead is the contents of folders at x; therefore folders[x] HTH, Tim -- Timothy Cook, MSc Health Informatics Research & Development Services LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook Skype ID == timothy.cook ************************************************************** *You may get my Public GPG key from popular keyservers or * *from this link http://timothywayne.cook.googlepages.com/home* **************************************************************
signature.asc
Description: This is a digitally signed message part
-- http://mail.python.org/mailman/listinfo/python-list