On 8/14/07, Zentrader wrote: > On Aug 14, 1:52 pm, Jeremy C B Nicoll wrote: > > When I use os.listdir() to return that list of leaf values, I do seem to get > > them in alphabetical order, A before B before C etc, but the ~-prefixed ones > > are returned after the Z-prefixed files rather than before the A-ones. > > I think that os.listdir() returns file names in chronological order, > that is in the order they were created on disk.
http://docs.python.org/lib/os-file-dir.html The order is arbitrary, and depends on the underlying directory structure and system calls. If you rely on the order being sorted, you should do it yourself. -Miles -- http://mail.python.org/mailman/listinfo/python-list