lib/redred.py
def importFile(self,file):
        '''imports a file, csv or .mat'''
        try:
            ext = os.path.splitext(file)[-1].lower()
            if ext == '.mat':
                if os.path.basename(file).lower() != 't-cal.mat':
                    self.importRawFile(file)
                else:
                    print('Ignored t-cal.mat')
            elif ext == '.txt':
                self.importCSV(file)
            else:
                print('Invalid format. Couldnt import file: ' + file)
        except FileNotFoundError:
            print('File ' + file + ' not found')
imports a file, csv or .mat
imports a file, csv or .mat
imports a file csv or . mat
def importFile(self,file):
        try:
            ext = os.path.splitext(file)[-1].lower()
            if ext == '.mat':
                if os.path.basename(file).lower() != 't-cal.mat':
                    self.importRawFile(file)
                else:
                    print('Ignored t-cal.mat')
            elif ext == '.txt':
                self.importCSV(file)
            else:
                print('Invalid format. Couldnt import file: ' + file)
        except FileNotFoundError:
            print('File ' + file + ' not found')
def importFile ( self , file ) : try : ext = os . path . splitext ( file ) [ - 1 ] . lower ( ) if ext == '.mat' : if os . path . basename ( file ) . lower ( ) != 't-cal.mat' : self . importRawFile ( file ) else : print ( 'Ignored t-cal.mat' ) elif ext == '.txt' : self . importCSV ( file ) else : print ( 'Invalid format. Couldnt import file: ' + file ) except FileNotFoundError : print ( 'File ' + file + ' not found' )
imports a file, csv or .mat
imports a file csv or . mat
'''imports a file, csv or .mat'''
self
file