[Tutor] What is missing?
Grimmtooth
grimmtoothtoo@yahoo.com
Mon, 4 Feb 2002 08:37:27 -0500
> DIR = "D:\\dp_test"
> for filename in os.listdir(DIR):
> full_path = os.path.join(DIR, filename)
> myFile = open(full_path, 'r')
> inFile = open('dp_hr.txt', 'w')
> count = len(myFile.readlines())
> print filename + ",", count
> inFile.write(filename + ', ' + string(count))
Where are you closing the files?
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com