simonratner/scrapy — comment on commit 7232c31f78358741f3b7c532bdc268d43ff51622
File:  line 0
By simonratner:

If logs are named using timestamps, that is news to me :-) Here is an excerpt from `ls -lt` after a few runs:

2011-12-23 20:30 a3a35e662da211e19d221231390e8872.log
2011-12-23 16:55 6a55050c2d7e11e19d221231390e8872.log
2011-12-23 14:32 c9037db42d4b11e19d221231390e8872.log
2011-12-23 07:19 22468b3c2d2e11e19d221231390e8872.log
2011-12-23 04:44 25979de82cf811e19d221231390e8872.log
2011-12-22 20:51 9482dafa2cd611e19d221231390e8872.log
2011-12-22 17:57 219a09342ca211e19d221231390e8872.log
2011-12-22 10:19 0bfe84342c7e11e19d221231390e8872.log
2011-12-22 07:34 6a8bec2c2c4b11e19d221231390e8872.log
2011-12-21 23:54 a21b6cd22c2611e19d221231390e8872.log
2011-12-21 21:32 50f231602bf911e19d221231390e8872.log

It looks like part of that name may be a timestamp, but the end result doesn't correspond to time ordering.

In any case, os.listdir does not guarantee alphanumeric ordering, and it would not surprise me if there are file systems out there which list files in some other arbitrary order.