On Tue, Aug 4, 2009 at 7:06 PM, Michael Savarese<geomajo...@gmail.com> wrote: > Greetings > Python newbie here, and thanks to all who have helped me previously. > Is there a way of grabbing file attributes while traversing with os.walk()? > It would be advantageous to have date modified and file size along with the > file name. > If anyone can point me in the right direction, I'd appreciate it.
Feed the path to os.stat(), and then use the `stat` module on the result: http://docs.python.org/library/os.html#os.stat http://docs.python.org/library/stat.html#module-stat Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list