def loadText(fileName, encoding='utf8'):
 try:
  fp = codecs.open(fileName, mode='r', encoding=encoding)
  content = fp.readlines()
  fp.close()
  logger.log(CUSTOM_LOGGING.SYSINFO, ('return file "%s" content .' % fileName))
  return content
 except Exception as e:
  logger.log(CUSTOM_LOGGING.WARNING, e)

def loadText ( fileName , encoding = 'utf8' ) : try : fp = codecs . open ( fileName , mode = 'r' , encoding = encoding ) content = fp . readlines ( ) fp . close ( ) logger . log ( CUSTOM_LOGGING . SYSINFO , ( 'return file "%s" content .' % fileName ) ) return content except Exception as e : logger . log ( CUSTOM_LOGGING . WARNING , e )
read file with given filename and encoding .