nmrglue.fileio.fileiobase.open_towrite

nmrglue.fileio.fileiobase.open_towrite(filename, overwrite=False, mode='wb')[source]

Open filename for writing and return file object

Function checks if file exists (and raises IOError if overwrite=False) and creates necessary directiories as needed.