parameters: ()
return_statement: return caps
docstring: Return a dictionary containing the mailcap database.
  
      The dictionary maps a MIME type (in all lowercase, e.g. 'text/plain')
      to a list of dictionaries corresponding to mailcap entries.  The list
      collects all the entries for that MIME type from all available mailcap
      files.  Each dictionary contains key-value pairs for that MIME type,
      where the viewing command is stored with the key "view".
docstring_summary: Return a dictionary containing the mailcap database.
docstring_tokens: Return a dictionary containing the mailcap database .
function: def getcaps():
      """Return a dictionary containing the mailcap database.
  
      The dictionary maps a MIME type (in all lowercase, e.g. 'text/plain')
      to a list of dictionaries corresponding to mailcap entries.  The list
      collects all the entries for that MIME type from all available mailcap
      files.  Each dictionary contains key-value pairs for that MIME type,
      where the viewing command is stored with the key "view".
  
      """
      caps = {}
      for mailcap in listmailcapfiles():
          try:
              fp = open(mailcap, 'r')
          except IOError:
              continue
          morecaps = readmailcapfile(fp)
          fp.close()
          for key, value in morecaps.iteritems():
              if not key in caps:
                  caps[key] = value
              else:
                  caps[key] = caps[key] + value
      return caps
function_tokens: def getcaps ( ) : caps = { } for mailcap in listmailcapfiles ( ) : try : fp = open ( mailcap , 'r' ) except IOError : continue morecaps = readmailcapfile ( fp ) fp . close ( ) for key , value in morecaps . iteritems ( ) : if not key in caps : caps [ key ] = value else : caps [ key ] = caps [ key ] + value return caps