On Jul 24, 11:52 am, "Lanny" <[EMAIL PROTECTED]> 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.
So you -only- want the files from one directory?
Try: _, _, files = os.walk('/top/folder/here').next()
The single underscore is a convention to indicate we don't care about
those results.
The .next() is needed to step through os.walk once, which will start
at the path you specify.
Hope this helps.
- alex23
--
http://mail.python.org/mailman/listinfo/python-list