Read text from fileName and eval it.
Convenience method.  Use the global namespace.
178437
public Object source( String filename )
        throws FileNotFoundException, IOException, EvalError
    {
        return source( filename, globalNameSpace );
    }
516090
def read_xml(filename):
    
    parser = et.XMLParser(remove_blank_text=True)
    isfile=False
    try:
        isfile = os.path.exists(filename)
    except ValueError as e:
        if 'path too long for Windows' in str(e):
            pass
        else:
            raise
    try:
        if isfile:
            return et.parse(filename, parser)
        else:
            r = et.fromstring(filename, parser)
            return r.getroottree()
    except IOError:
        log.exception('unable to open file [[}]'.format(filename))
    except et.XMLSyntaxError:
        log.exception('unable to parse XML [{}]'.format(filename))
        return None
    return None
111720
def _read_text(self, filename):
        
        with io.open(filename, 'rt', encoding='utf-8') as f:
            return f.read()
657558
def _read_file(self, filename):
        

        if self.__compression:
            f = gzip.GzipFile(filename, "rb")
        else:
            f = open(filename, "rb")
        res = pickle.load(f)
        f.close()
        return res
1006679
def read_file(filename):
    """"""
    path = os.path.abspath(os.path.dirname(__file__))
    filepath = os.path.join(path, filename)
    try:
        return open(filepath).read()
    except IOError:
        return ''
779108
def _maybe_read_file(filename):
  
  try:
    with open(filename) as infile:
      return infile.read()
  except IOError as e:
    if e.errno == errno.ENOENT:
      return None
770527
def read(input)
      if input.is_a? Symbol
        @file = File.expand_path get_eval_file input
        File.read @file
      else
        @file = File.expand_path __FILE__
        input
      end
    end
1325229
def load(self, filename=None, ignore_discard=False, ignore_expires=False):
        """"""
        if filename is None:
            if self.filename is not None: filename = self.filename
            else: raise ValueError(MISSING_FILENAME_TEXT)

        f = open(filename)
        try:
            self._really_load(f, filename, ignore_discard, ignore_expires)
        finally:
            f.close()
1169959
def class_from_file(filename)
      filename = filename.to_s

      if File.exists?(filename) && File.readable?(filename)
        self.class_eval(IO.read(filename), filename, 1)
        self
      else
        raise IOError, "Could not open or read: '#{filename}'"
      end
    end
1301891
def read(filename):
    
    fname = os.path.join(here, filename)
    with codecs.open(fname, encoding='utf-8') as f:
        return f.read()
1238256
def read(ns_name, source)
      ast = Clojure::Reader.new(source).ast
      ns = namespace ns_name.to_sym
      ast.map { |form| ns.evaluate form }.last
    end
1091925
def _get_baseline_string_from_file(filename):  # pragma: no cover
    """"""
    try:
        with open(filename) as f:
            return f.read()

    except IOError:
        log.error(
            'Unable to open baseline file: {}\n'
            'Please create it via\n'
            '   `detect-secrets scan > {}`\n'
            .format(filename, filename),
        )
        raise
629006
public Object source( String filename, NameSpace nameSpace )
        throws FileNotFoundException, IOException, EvalError
    {
        File file = pathToFile( filename );
        Interpreter.debug("Sourcing file: ", file);
        Reader sourceIn = new BufferedReader( new FileReader(file) );
        try {
            return eval( sourceIn, nameSpace, filename );
        } finally {
            sourceIn.close();
        }
    }
1167840
def read_file(filename):
    
    if os.path.isfile(filename):
        with open(filename, 'r') as f:
            return f.read()
701955
def load_from_filename(self, file_name, sep='\n'):
        """"""
        fp = open(file_name, 'rb')
        n = self.load_from_file(fp, sep)
        fp.close()
        return n
581614
def read_local_file(filename):
    
    frm = inspect.currentframe().f_back
    if frm.f_code.co_name == 'run_code':
        frm = frm.f_back
    path = os.path.split(frm.f_code.co_filename)[0]
    return read_file(os.path.join(path, filename))
809742
def _read_from_file(self, filename):
        """"""
        try:
            with open(filename, 'rb') as f:
                return self._loads(f.read())
        except (IOError, OSError):
            logger.warning('Error opening file: {}'.format(filename))
            return None