Steven Bethard wrote:
for root, files, dirs in os.walk(path)
for f in files:
try:
x = file(f, 'rb')
data = x.read()
x.close()
Remember that CPython is implemented in C, and so all the builtin types
(including file) basically execute C code directly. My experience with
Python file objects is that they are quite fast when you're doing simple
things like the example above.
I'm dealing with a terabyte of files. Perhaps I should have mentioned that.
--
http://mail.python.org/mailman/listinfo/python-list