Python Write Variable To Binary File