Binary read/write in genx export for Py3