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          tsea...@palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to