classification
Title: mimetypes does not give canonical extension for guess_extension with text/plain
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Add preferred extensions for MIME types
View: 1043134
Assigned To: Nosy List: lambacck, pitrou, ptarjan
Priority: normal Keywords:

Created on 2009-08-29 00:10 by ptarjan, last changed 2010-11-21 01:15 by eric.araujo. This issue is now closed.

Messages (3)
msg92051 - (view) Author: Paul Tarjan (ptarjan) Date: 2009-08-29 00:10
>>> import mimetypes

>>> mimetypes.guess_extension("text/plain")
'.ksh'

most others are correct, it is just this one is quite wrong. I would
recommend changing it to .txt . 

>>> mimetypes.guess_all_extensions("text/plain")
['.ksh', '.pl', '.c', '.bat', '.h', '.txt', '.asc', '.text', '.pot', '.brf']
msg92062 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-08-29 11:34
This is quite a reasonable request indeed.
msg121825 - (view) Author: Chris Lambacher (lambacck) * Date: 2010-11-21 01:14
This is a dup of #1043134
History
Date User Action Args
2010-11-21 01:15:53eric.araujosetstatus: open -> closed
resolution: duplicate
title: mimetypes does not give cannonical extension for guess_extension with text/plain -> mimetypes does not give canonical extension for guess_extension with text/plain
superseder: Add preferred extensions for MIME types
stage: needs patch -> resolved
2010-11-21 01:14:53lambaccksetnosy: + lambacck
messages: + msg121825
2009-08-29 11:34:30pitrousetpriority: normal
versions: - Python 2.5, Python 3.0
nosy: + pitrou

messages: + msg92062

stage: needs patch
2009-08-29 00:10:09ptarjancreate