Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / bsd / file / dist / python / example.py
blobfc41a86d7ed7bad82bc85f5204dd88e502708892
1 import magic
3 ms = magic.open(magic.MAGIC_NONE)
4 ms.load()
5 type = ms.file("/path/to/some/file")
6 print type
8 f = file("/path/to/some/file", "r")
9 buffer = f.read(4096)
10 f.close()
12 type = ms.buffer(buffer)
13 print type
15 ms.close()