Adam Hupp

Results 103 comments of Adam Hupp

Any chance you can share the file? I'd like a test case and am not sure how to create one.

The attached file produces this output from from_file: """Composite Document File V2 Document, Little Endian, Os: Windows, Version 6.1, Code page: 1251, Author: user, Template: Normal.dotm, Last Saved By: Windows,...

@utkonos "I would update all the code to do away with any Python 2 handling." This isn't python 2 handling specifically; when I first added support for python 3 it...

backslashreplace looks like a good choice, will go with that. I'll add a from_buffer_bytes/from_file_bytes to Magic as well for anyone that wants the behavior like your monkeypatch.

I've changed to backslashdecode in a74c994b704d3476e2054cc6332c0a4c49ea1c69.

Thanks for starting this discussion. I think a nice way to handle this is publishing a separate package that exposes the shared lib/data file with [package_data](https://docs.python.org/2/distutils/setupscript.html#installing-package-data), and then make that...

You're seeing find_library throw an error? That's not the documented behavior. Can you give a stack trace or error log? I don't have a windows machine to test on but...

I'm not that familiar with how this works on windows. What would this look like for users? My preference TBH is to have a separate package with the binaries with...

I'd suggest reading the first chunk of the file (2k or so) and passing that to magic.from_buffer. The underlying libmagic library does have an interface that takes a file descriptor,...

I'm not familiar with that libmagic feature, can you given an example of how it's used?