code: def splitext( filename ):
      
      index = filename.find('.')
      if index == 0:
          index = 1+filename[1:].find('.')
      if index == -1:
          return filename, ''
      return filename[:index], filename[index:]
      return os.path.splitext(filename)
docs: Return the filename and extension according to the first dot in the filename.
          This helps date stamping .tar.bz2 or .ext.gz files properly.