sorting directory
psybar phreak
psybar_phreak at yahoo.com
Sun May 25 19:18:21 EDT 2003
i am currently using glob (thanks to the wisdom of yee here) to filter
a directory for files that end in certain extensions, as i get a
match, i print out the contents. what i want to do now, however, is
to sort these according to the file name, eg file1, comes before file
2.
can i sort the directory contents, before i start filtering? or am i
going to have to filter, put results in a list, then sort, then loop
through list and print results? (i hope its the first one!)
thanks!!
More information about the Python-list
mailing list