utils.compat3¶
Module: utils.compat3
¶
Routines for Python 3 compatibility
These are in addition to the nibabel.py3k routines.
-
nipy.utils.compat3.
open4csv
(fname, mode)[source]¶ Open filename fname for CSV IO in read or write mode
- Parameters
fname : str
filename to open
mode : {‘r’, ‘w’}
Mode to open file. Don’t specify binary or text modes; we need to chose these according to python version.
- Returns
fobj : file object
open file object; needs to be closed by the caller