Import NetBSD file(1)

This commit is contained in:
Ben Gras
2012-03-31 20:24:03 +02:00
parent adb4e9428a
commit ef01931f76
304 changed files with 81554 additions and 319 deletions

View File

@@ -0,0 +1,16 @@
import magic
ms = magic.open(magic.MAGIC_NONE)
ms.load()
type = ms.file("/path/to/some/file")
print type
f = file("/path/to/some/file", "r")
buffer = f.read(4096)
f.close()
type = ms.buffer(buffer)
print type
ms.close()