Re: MIME Magic

2007-03-17 Thread aspineux
On 18 mar, 00:54, "Samuel" <[EMAIL PROTECTED]> wrote: > On Mar 18, 12:30 am, Jorge Godoy <[EMAIL PROTECTED]> wrote: > > > I'd start by taking a look at "file"'s code. :-) > > > The thing is being able to identify the signatures of several different > > types > > of files. Here's some help for >

Re: MIME Magic

2007-03-17 Thread Samuel
On Mar 18, 12:30 am, Jorge Godoy <[EMAIL PROTECTED]> wrote: > I'd start by taking a look at "file"'s code. :-) > > The thing is being able to identify the signatures of several different types > of files. Here's some help for > you:http://www.garykessler.net/library/file_sigs.html > > And here's

Re: MIME Magic

2007-03-17 Thread Jorge Godoy
"Samuel" <[EMAIL PROTECTED]> writes: > Hi, > > How can I determine the type of a file from "magic bytes", similar to > what the "file" command on unix does? I found > > http://docs.python.org/lib/module-mimetypes.html > > but this only seems to use the filename (extension) for finding the > type.