#NEWLINE# def _check_fname( fname ) : #NEWLINE# #INDENT# 'Check if the file extension is valid.' #NEWLINE# fmt = str ( op . splitext ( fname ) [ ( - 1 ) ] ) #NEWLINE# if ( fmt == '.dat' ) : #NEWLINE# #INDENT# raise NotImplementedError ( 'Old data format .dat detected. Please update your EEGLAB version and resave the data in .fdt format' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( fmt != '.fdt' ) : #NEWLINE# #INDENT# raise IOError ( ( 'Expected .fdt file format. Found %s format' % fmt ) )