Switched memory mapping over to Python with the mmap module