[Zope-dev] Proposal: cleaning up the content-type story
Tres Seaver
tseaver at palladion.com
Thu Oct 1 11:55:40 EDT 2009
Thomas Lotze wrote:
> I also wonder whether it might make sense to utilise the /etc/mime.types
> database (or the system's equivalent) for guessing based on the file-name
> extension,
The Python mimetypes module already uses that file in any of the
"standard" Unix locations.
> and libmagic (if available) for magic-number tests based on
> file contents. But of course, these ideas don't have much to do with the
> restructuring discussed in this thread.
Two PyPI modules claim to do the magic number guessing thing:
- http://pypi.python.org/pypi/python-magic/0.1 is a ctypes wrapper
around libmagic -- no sdist ;(
- http://pypi.python.org/pypi/magic/0.1 has its own database inlined
in the module. It has no distributions at all, just a link to a bare
magic.py file.
Tres.
--
===================================================================
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
More information about the Zope-Dev
mailing list