def _fiff_get_fid(fname):
 if isinstance(fname, string_types):
  if (op.splitext(fname)[1].lower() == '.gz'):
   logger.debug('Using gzip')
   fid = GzipFile(fname, 'rb')
  else:
   logger.debug('Using normal I/O')
   fid = open(fname, 'rb')
 else:
  fid = fname
  fid.seek(0)
 return fid

def _fiff_get_fid ( fname ) : if isinstance ( fname , string_types ) : if ( op . splitext ( fname ) [ 1 ] . lower ( ) == '.gz' ) : logger . debug ( 'Using gzip' ) fid = GzipFile ( fname , 'rb' ) else : logger . debug ( 'Using normal I/O' ) fid = open ( fname , 'rb' ) else : fid = fname fid . seek ( 0 ) return fid
open a fif file with no additional parsing .