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

My installation could not find libmagic. Any suggestions?

At least you will know why loading the library fails

Windows Server 2016, Python 10.0 python-magic 0.4.27 python-magic-bin 0.4.14 Code: ``` import magic def main(): ft = magic.Magic() file = 'memblock.h' r = ft.from_file(file) print(r) if __name__ == '__main__': main()...

Hi I have installed the library via pip and received no warning then when I try to import it libmagic is not found: PS G:\Pythontest> pip install python-magic Collecting python-magic...

I wrote this little fix in order to access libmagic in mac even if it's installed with brew on user's home folder.

On Windows 10 a plain text buffer is classified as application/octet-stream which is indicative of a binary file (I think). Ubuntu Linux is correctly identifying as "text/plain". Python3.9, python-magic-bin as...

I'm getting this error of Magic version on my Virtual Environment when I run python3.8 manage.py migrate on my Django REST API. I've already done the following after activating Virtual...

`cat etc/*-releases >> ` ``` PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" ``` File that is recognized as "CSV" in mac (that is...

I forked this fine code for a long while at https://github.com/nexB/typecode/blob/8e926684f260ce1cf7ffed74b2da99db97210f13/src/typecode/magic2.py One of the key change is that I can provide a bundled pre-built binary of use a system-provided binary...

The Magic class's from_file() method begins with an elegant way of catching certain errors. Lines 110-113 in \_\_init\_\_.py: ``` def from_file(self, filename): # raise FileNotFoundException or IOError if the file...