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:

- is a ctypes wrapper
   around libmagic -- no sdist ;(

- has its own database inlined
   in the module.  It has no distributions at all, just a link to a bare file.

Tres Seaver          +1 540-429-0999
Palladion Software   "Excellence by Design"

Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to