◐ Shell
clean mode source ↗

Message 79961 - Python tracker

3.0, WinXP
import mimetypes
print(mimetypes.guess_extension('image/jpeg'))
mimetypes.init()
print(mimetypes.guess_extension('image/jpeg'))
gives
.jpe
.jpe

I wonder at this answer since .jpg and occasionally .jpeg is standard in
Windows usage, but the doc is unclear to me as to the actual intent of
the function.