def rmfile(path):
 if osp.isfile(path):
  if is_win:
   os.chmod(path, 511)
  os.remove(path)

def rmfile ( path ) : if osp . isfile ( path ) : if is_win : os . chmod ( path , 511 ) os . remove ( path )
ensure file deleted also on *windows* where read-only files need special treatment .