python-magic icon indicating copy to clipboard operation
python-magic copied to clipboard

A python wrapper for libmagic

Results 62 python-magic issues
Sort by recently updated
recently updated
newest added

Love the project. Would be great to use it in python 3.7!

Similarly to `file` command having `--dereference` it might be useful to have a little sugaring of `dereference=False` option for `from_file` which would call to `os.path.realpath(filename)` first

feature

I want to get all mimetypes of a file using the `MAGIC_CONTINUE` flag. I would prefer an array instead of a string that needs to be parsed first. Is it...

feature

Added util folder to hold the mimetypes variable generator and default mime-types as harvested from libmagic. Added dictionary of mime-types -> modules that might have identified it. Did not add...

This is a quick hack but it makes smartos or any illumos dirivative supported.

just like the command line version can do it

I've found that the combination of `from_buffer` and `uncompress=True` can crash the library. I suspect, but am unsure, that this stems from wrong usage of `file_buffer`. My system is Ubuntu...

libname = ctypes.util.find_library('magic') or ctypes.util.find_library('magic1') should add ctypes.util.find_library('msys-magic-1.dll')

Recently, I've been having problems getting python-magic to work on Windows. I have libmagic installed, along with all the necessary DLLs (including `magic1.dll`) but I kept getting Windows 126 errors(module...

Are you open to create a wheel package for windows delivering all the binary deps? (I would do it and send you a PR)