You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Zope users sometimes asks to add
additional mime.types entries to Zope.
Zopes mime-types handling is mostly
based on mimetypes.py. In such cases
users should be able to maintain their
own mime.types files.
mimetypes.py currently tries to look
for mime.types files in 4 hardcoded locations.
It would be more convinient to specify
additional locations e.g. by an env. var
that holds a list of additional locations
or by any other mechanism that allows user-defined
locations.
The hardcoded locations also don't work on
Windows.
Sounds like there should be an object which can be configured with a search path at construction time. Applications could then store an appropriate mime.types file in a location that makes sense for them.
Would this suite your purposes?
zopyx commented on Jul 23, 2001
zopyxmannequin
MannequinAuthor
More actions
Logged In: YES
user_id=11084
A more OO approach would be nice. At least a possibility to add "somehow"
different file locations. I have not special preference for any solution.
Ok, I've revised this again, to be a little cleaner and more consistent internally. I've attached a copy and will check it in as soon as I'm sure the updated documentation won't break the formatting.
Activity
zopyx commentedon Jul 9, 2001
Zope users sometimes asks to add
additional mime.types entries to Zope.
Zopes mime-types handling is mostly
based on mimetypes.py. In such cases
users should be able to maintain their
own mime.types files.
mimetypes.py currently tries to look
for mime.types files in 4 hardcoded locations.
It would be more convinient to specify
additional locations e.g. by an env. var
that holds a list of additional locations
or by any other mechanism that allows user-defined
locations.
The hardcoded locations also don't work on
Windows.
freddrake commentedon Jul 23, 2001
Logged In: YES
user_id=3066
Sounds like there should be an object which can be configured with a search path at construction time. Applications could then store an appropriate mime.types file in a location that makes sense for them.
Would this suite your purposes?
zopyx commentedon Jul 23, 2001
Logged In: YES
user_id=11084
A more OO approach would be nice. At least a possibility to add "somehow"
different file locations. I have not special preference for any solution.
Andreas
freddrake commentedon Jul 24, 2001
Logged In: YES
user_id=3066
I've attached a new version of mimetypes.py; something like this should do the trick and be easy to extend as needed.
Comments welcome.
freddrake commentedon Jul 27, 2001
Logged In: YES
user_id=3066
OK, I really should update the version here to be the fixed one; sorry about the broken versions! If there are no objections, I'll check this in soon.
freddrake commentedon Aug 3, 2001
Logged In: YES
user_id=3066
Ok, I've revised this again, to be a little cleaner and more consistent internally. I've attached a copy and will check it in as soon as I'm sure the updated documentation won't break the formatting.
freddrake commentedon Aug 3, 2001
Logged In: YES
user_id=3066
Checked in the new version as Lib/mimetypes.py revision 1.15, with documentation in Doc/lib/libmimetypes.tex revision 1.8.