Peter A. Schott <[EMAIL PROTECTED]> writes:
> Is there any way to build a list of the first 1000 files or so in a folder?

The obvious way is

   first_1000 = os.listdir()[:1000]

That does build a potentially bigger list in memory before chopping
off the 1000 elements, but unless you're running out of memory to hold
the list (which these days probably means millions of files in the
directory), don't worry about it.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to