Module python-magic on/for Windows?
Michael Torrie
torriem at gmail.com
Mon May 12 08:54:35 EDT 2008
Larry Hale wrote:
> Alternately, if one wishes to leave/place the magic files elsewhere,
> do like:
>
> >>> test = magic.Magic( magic_file = 'C:\\Program Files\\GnuWin32\
> \share\\file\\magic' ) # <-- spec where/what the file is
>
> NOTE: Even if the "magic_file" location *is* specified, "mime = True"
> still works fine. (Haven't checked, but I presume the source simply
> tacks ".mime" to the filename automagically.) Obviously/also, one
> needn't specify the argument names if one uses proper argument order:
> magic.Magic( mime, magic_file ) :)
>
>
> THANKS SO MUCH, Michael, for your answers and helping me alone the
> way... :)
Glad it's working for you.
More information about the Python-list
mailing list