diff options
Diffstat (limited to 'Tools/scripts/suff.py')
-rwxr-xr-x | Tools/scripts/suff.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Tools/scripts/suff.py b/Tools/scripts/suff.py index e085cd0..ee7499f 100755 --- a/Tools/scripts/suff.py +++ b/Tools/scripts/suff.py @@ -9,21 +9,21 @@ import sys def main(): files = sys.argv[1:] suffixes = {} - for file in files: - suff = getsuffix(file) + for filename in files: + suff = getsuffix(filename) if not suffixes.has_key(suff): suffixes[suff] = [] - suffixes[suff].append(file) + suffixes[suff].append(filename) keys = suffixes.keys() keys.sort() for suff in keys: print `suff`, len(suffixes[suff]) -def getsuffix(file): +def getsuffix(filename): suff = '' - for i in range(len(file)): - if file[i] == '.': - suff = file[i:] + for i in range(len(filename)): + if filename[i] == '.': + suff = filename[i:] return suff main() |