mailcap
mailcap — Mailcap file handling
Source code: Lib/mailcap.py
Mailcap files are used to configure how MIME-aware applications such as mail readers and Web browsers react to files with different MIME types. (The name “mailcap” is derived from the phrase “mail capability”.) For example, a mailcap file might contain a line like video/mpeg; xmpeg %s
. Then, if the user encounters an email message or Web document with the MIME type video/mpeg, %s
will be replaced by a filename (usually one belonging to a temporary file) and the xmpeg program can be automatically started to view the file.
The mailcap format is documented in 登录查看完整内容