Module python-magic on/for Windows?
Larry Hale
larzluv at hotmail.com
Sun May 11 21:02:48 EDT 2008
After putting the magic1.dll file to C:\Program Files\Python25\DLLs
(looking at the directory structure, that seemed as good a place as
any), now I can *import* the module, but...
>>> import magic
>>> test = magic.Magic()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build\bdist.win32\egg\magic.py", line 32, in __init__
File "build\bdist.win32\egg\magic.py", line 72, in _check_error
magic.MagicException: could not find any magic files!
I've placed
474,146 magic
1,037,440 magic.mgc
32,203 magic.mime
45,696 magic.mime.mgc
77,312 magic1.dll
into
C:\windows\system32
in Windows/System PATH
AND (simultaneously)
C:\Program Files\python25\DLLs
in sys.path/PYTHONPATH
(I've also tried putting copies into different dirs in both PYTHONPATH
and system PATH, to no avail.)
Obviously, magic1.dll/magic.py (et al) can't FIND the needed file(s),
but I'm not sure how to go about discerning WHERE it/they are looking
- any thought(s)/suggestion(s), anyone??
Thanks in advance!
-Larry
P.S.: Thanks, again, Michael! ;) - L
More information about the Python-list
mailing list