mvpa2.misc.io.base.safe_write

mvpa2.misc.io.base.safe_write(fnout, s, mode='wb')

Helper to write to a file and check result file size to match