> Hi everyone - > I'm beginning to learn how to program in python. I need to process > several text files simultaneously. The program needs to open several files > (like a corpus) and output the total number of words. I can do that with > just one file but not the whole directory. I tried glob but it didn't > work. Your ideas are greatly appreciated. Thanks, > Paulo
What do you have so far? I don't just want to give you an answer. You say that glob didn't work... Probably because you are not realizing that glob returns a list of filenames, and you can't open a whole list at a time. You'll have to use a loop or something similar. JS _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor