On Wed, Nov 23, 2016 at 6:20 AM, Victor Stinner <victor.stinner at gmail.com> wrote: > It's not bug but a feature :-) Python doesn't protect yourself against > mistakes :-) AIUI the normal way to protect yourself is to unlink (remove) the file and create it from scratch, rather than truncate it. ChrisA