sorting directory
Duncan Booth
duncan at NOSPAMrcp.co.uk
Tue May 27 04:23:41 EDT 2003
bokr at oz.net (Bengt Richter) wrote in news:barmqv$6cg$0 at 216.39.172.122:
> for windows NT4, Pythoh 2.2.2 glob.glob seems to return a list that is
> sorted already, so
>
> for path in glob.glob(path_pattern): print path
>
> should do it.
>
Not true. If you are accessing an NTFS disc, the files are always sorted
because the directory is stored as a b-tree, however if you access files on
a FAT formatted disc you will get them in an arbitrary order.
--
Duncan Booth duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?
More information about the Python-list
mailing list