Comment #12 on issue 1315 by ali.ikinci: Need a mime-type library on Linux
http://code.google.com/p/chromium/issues/detail?id=1315

What about using the mimetype module of python. Normally it makes use of the
'/etc/mime.types' but it can also be fed something else. Additionally it  
can be used
with the strict option to only the official types registered with IANA. I  
have been
using this module for a long time, it is fast and very easy to use. The  
documentation
(for python 2.6 but 2.4 is not very different) can be found here:

http://docs.python.org/library/mimetypes.html

Guessing an extension for a given mimetype:
mimetypes.guess_extension(type[, strict])

Guessing the mimetype for a given filename:
mimetypes.guess_type(filename[, strict])

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/chromium-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to