| |
---|
| | # python Library Imports |
---|
| | |
---|
| | import getopt |
---|
| | import os |
---|
| | import string |
---|
| | import sys |
---|
| | |
---|
| | # Version info |
---|
| | |
---|
| | VERSION = "$Id: tdir,v 1.59 2001/07/04 00:02:12 tundra Exp $" |
---|
| | VERSION = "$Id: tdir,v 1.60 2001/07/05 15:37:56 tundra Exp $" |
---|
| | |
---|
| | |
---|
| | # Booleans |
---|
| | |
---|
| |
---|
| | def OrderByExtension(list): |
---|
| | ExtList = {} |
---|
| | ExtList[""] = [] # List of files with no extension |
---|
| | for x in list: |
---|
| | y = string.rfind(x, SEP) |
---|
| | y = x.rfind(SEP) |
---|
| | if y != -1: # File has extension |
---|
| | ext = x[y+1:] |
---|
| | name = x[:y] |
---|
| | if not ExtList.has_key(ext): |
---|
| |
---|
| | |