Lanny wrote:
How would one make a list of the files in the top directory
using os.walk.

I need to pick a random file from said list.

Thanks.



-- Posted on news://freenews.netfront.net - Complaints to [EMAIL PROTECTED] --


how about:

import os

x = os.walk('/')
(root,dirs,files) = x.next()



'files' should contain a list of filenames.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to