nilmdb/test/test-struct-pack.py
Jim Paris b4a0f737f5 misc updates
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@9733 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2011-06-27 16:35:18 +00:00

12 lines
154 B
Python

#!/usr/bin/python
import struct
import mmap
f = open("test.dat", "rb+")
mm = mmap.mmap(f.fileno(),3)
print len(mm)
print "first 3 bytes: " + mm[0:3];