Sort files by date

fargo fargo_01 at hotmail.com
Tue Jul 12 07:01:19 EDT 2005


Jeremy Sanders wrote:

> you could do something like:
> 
> l = [(os.stat(i).st_mtime, i) for i in glob.glob('*')]
> l.sort()
> files = [i[1] for i in l]

Thank you for your help, this is excatly what I wasa looking for.



More information about the Python-list mailing list