[ python-Bugs-1043134 ] mimetypes.guess_extension('text/plain') == '.ksh' ???

SourceForge.net noreply at sourceforge.net
Sun Oct 10 10:44:38 CEST 2004


Bugs item #1043134, was opened at 2004-10-08 17:44
Message generated for change (Comment added) made by kxroberto
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1043134&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Robert Kiendl (kxroberto)
Assigned to: Nobody/Anonymous (nobody)
Summary: mimetypes.guess_extension('text/plain') == '.ksh' ???

Initial Comment:
Instead of returning the first in the list of
extensions it should return the most reasonable . here:
to have a *.txt on disk after saveing?



----------------------------------------------------------------------

>Comment By: Robert Kiendl (kxroberto)
Date: 2004-10-10 10:44

Message:
Logged In: YES 
user_id=972995

in mimetypes.py there is already a

common_types = {
    '.jpg' : 'image/jpg',
...

.txt could be added,
mayby guess_extension should first reverse-take it out of
there, not random ...?

background: my intent was to save MIME attachment as
(startable) temporary file. yet got wonderful .ksh's for
textfiles, and had to fumble ...

 


----------------------------------------------------------------------

Comment By: Johannes Gijsbers (jlgijsbers)
Date: 2004-10-09 17:26

Message:
Logged In: YES 
user_id=469548

How would you suggest finding out what the most reasonable
extension for a mime type is?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1043134&group_id=5470


More information about the Python-bugs-list mailing list