mimetypes oddity

Terry Reedy tjreedy at udel.edu
Fri Jan 16 17:42:51 CET 2009


Sion Arrowsmith wrote:
> In article <mailman.7301.1232043685.3487.python-list at python.org>,
>  <skip at pobox.com> wrote:
>>    [mimetype weirdness reported]
>>    Sion> Is this a bug?
>> Might be.  Can you file a bug report in the Python issue tracker with a
>> small script that demonstrates the behavior?
> 
> http://bugs.python.org/issue4963
> 
> (It's tagged as being 2.4 and 2.5 because those are the versions I
> have to hand to confirm it on, but I'd be rather surprised if it's
> not still like this in 2.6.)

Trying to reproduce a bug, as this report requires, is easier if you 
give code that can be copy and pasted into the interpreter or even into 
an edit window (as with IDLE) to be run from there. (3.0 version)

import mimetypes
print(mimetypes.guess_extension('image/jpeg'))
mimetypes.init()
print(mimetypes.guess_extension('image/jpeg'))




More information about the Python-list mailing list