Back to index

python3.2  3.2.2
Functions
suff Namespace Reference

Functions

def main
def getsuffix

Function Documentation

def suff.getsuffix (   filename)

Definition at line 20 of file suff.py.

00020 
00021 def getsuffix(filename):
00022     name, sep, suff = filename.rpartition('.')
00023     return sep + suff if sep else ''
00024 

Here is the call graph for this function:

Here is the caller graph for this function:

def suff.main ( void  )

Definition at line 10 of file suff.py.

00010 
00011 def main():
00012     files = sys.argv[1:]
00013     suffixes = {}
00014     for filename in files:
00015         suff = getsuffix(filename)
00016         suffixes.setdefault(suff, []).append(filename)
00017     for suff, filenames in sorted(suffixes.items()):
00018         print(repr(suff), len(filenames))
00019 

Here is the call graph for this function:

Here is the caller graph for this function: