Read And Write Binary File In Python