Mix of struct and mmap module for python