# mailcap - pydoc - phpman

Help on module mailcap:

## NAME
    mailcap - Mailcap file handling.  See RFC 1524.

## MODULE REFERENCE
    <https://docs.python.org/3.10/library/mailcap.html>

    The following documentation is automatically generated from the Python
    source files.  It may be incomplete, incorrect or include features that
    are considered implementation detail and may vary between Python
    implementations.  When in doubt, consult the module reference at the
    location listed above.

## FUNCTIONS
### findmatch
        Find a match for a mailcap entry.

        Return a tuple containing the command line, and the mailcap entry
        used; (None, None) if no match is found.  This may invoke the
        'test' command of several matching entries before deciding which
        entry to use.

### 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".

## DATA
    __all__ = ['getcaps', 'findmatch']

## FILE
    /usr/lib/python3.10/mailcap.py


