Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of use in readme doesn't works! #10

Closed
bioinfornatics opened this issue Jul 6, 2011 · 1 comment
Closed

Example of use in readme doesn't works! #10

bioinfornatics opened this issue Jul 6, 2011 · 1 comment

Comments

@bioinfornatics
Copy link

for use current magic

import magic
path="path/to/file"
mime = magic.open(magic.MIME_TYPE) # you can choose other flag see magic.py
mime.load()
mime.file(path)

You can add new magic file! With load method, like:

mime.load(file="/path/to/magicfile")
@ahupp
Copy link
Owner

ahupp commented Dec 29, 2011

I think you might be thinking of the other magic distribution, that comes with the fileutils. None of these examples appear in python-magic's README.

@ahupp ahupp closed this as completed Dec 29, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants