February 2006
Intermediate to advanced
648 pages
14h 53m
English
The mimetypes module is used to guess the MIME type associated with a file, based on its filename extension. It also converts MIME types to their standard filename extensions. MIME types consist of a type/subtype pair. The following list shows the MIME types recognized by Python 2.4:
| File Suffix | MIME Type |
|---|---|
| .a | application/octet-stream |
| .ai | application/postscript |
| .aif | audio/x-aiff |
| .aifc | audio/x-aiff |
| .aiff | audio/x-aiff |
| .au | audio/basic |
| .avi | video/x-msvideo |
| .bat | text/plain |
| .bcpio | application/x-bcpio |
| .bin | application/octet-stream |
| .bmp | image/x-ms-bmp |
| .c | text/plain |
| .cdf | application/x-netcdf |
| .cpio | application/x-cpio |
| .csh | application/x-csh |
| .css | text/css |
| .dll | application/octet-stream |
| .doc | application/msword |
| .dot | application/msword |
| .dvi | application/x-dvi |
| .eml | message/rfc822 |
| .eps | application/postscript ... |
Read now
Unlock full access