1 # `file-magic`: Python Bindings
3 This library is a Python ctypes interface to `libmagic`.
8 You can install `file-magic` either with:
10 python setup.py install
14 pip install file-magic
21 detected = magic.detect_from_filename('magic.py')
22 print 'Detected MIME type: {}'.format(detected.mime_type)
23 print 'Detected encoding: {}'.format(detected.encoding)
24 print 'Detected file type name: {}'.format(detected.name)
27 ## Developing/Contributing