diff options
author | Adam Hupp <adam@hupp.org> | 2020-10-01 12:38:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-01 12:38:17 -0700 |
commit | 57b18fc1153bd98950820364938b2dd8be3784ec (patch) | |
tree | 2437065de41a48d9f0f418b4105b9feae7984bc2 | |
parent | 8d8e4858af4e9b157f8e83cd8f1076c36ca6338d (diff) | |
download | python-magic-57b18fc1153bd98950820364938b2dd8be3784ec.tar.gz |
Update README.md
-rw-r--r-- | README.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -15,7 +15,7 @@ functionality is exposed to the command line by the Unix command >>> magic.from_file("testdata/test.pdf") 'PDF document, version 1.2' # recommend using at least the first 2048 bytes, as less can produce incorrect identification ->>> magic.from_buffer(open("testdata/test.pdf").read(2048)) +>>> magic.from_buffer(open("testdata/test.pdf", "rb").read(2048)) 'PDF document, version 1.2' >>> magic.from_file("testdata/test.pdf", mime=True) 'application/pdf' |