On Tue, 05 Oct 2004 12:44:32 +0200, Tino Wildenhain <[EMAIL PROTECTED]> wrote:
> Well, the problem might be the asymptation part of the filename
> should be considered an indicator of its contents.

That is a nuissance.  It's unfortunate we still don't have any sort of
common type system for bytestreams that's supported in filesystems.

But disk files aren't the only source of bytestreams, so that doesn't
necessarily help us in the end.

> Arent there any libs for python to examine the contents (usually
> the first few bytes) for the type of the file?
I'm not aware of any for the general case.  There are a few things
like the imghdr module, but those are not for arbitrary files, and
likely aren't sufficiently capable.

I think there's a library from the Gnome desktop project for this
(basically providing something like the Unix "file" command), but I
don't know if there's a Python wrapper for the library, or an
all-Python re-implementation.


Fred L. Drake, Jr.    <fdrake at gmail.com>
Zope Corporation
Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to