Gets and parses file
763051
def __parse_comments():
    ''''''
    filename = get_file('comments.tsv')

    with io.open(filename, 'r', encoding='cp1252') as textfile:
        next(textfile)

        for line in textfile:
            tokens = line.strip().split('\t')
            chebi_id = int(tokens[1])

            if chebi_id not in __COMMENTS:
                __COMMENTS[chebi_id] = []

            # Append Comment:
            com = Comment(tokens[3],
                          tokens[4],
                          tokens[5],
                          datetime.datetime.strptime(tokens[2], '%Y-%M-%d'))

            __COMMENTS[chebi_id].append(com)
1042652
def parseFile(self, filename):
        '''
            
        '''
        self.reset()

        if isinstance(filename, file):
            contents = filename.read()
        else:
            with codecs.open(filename, 'r', encoding=self.encoding) as f:
                contents = f.read()

        self.feed(contents)
559132
def parseFile( self, file_or_filename ):
        
        try:
            file_contents = file_or_filename.read()
        except AttributeError:
            f = open(file_or_filename, "rb")
            file_contents = f.read()
            f.close()
        return self.parseString(file_contents)
1051763
def parsed_file(config_file):
    """"""
    parser = ConfigParser(allow_no_value=True)
    parser.readfp(config_file)
    return parser
915876
function parseFile(dir, filename) {
  const filePath = path.join(dir, filename);
  const fileStat = fs.statSync(filePath);
  const fileExt = path.extname(filename);

  return {
    path: filePath,
    stat: fileStat,
    ext: fileExt
  };
}
577442
function parse(fileString, callback) {
	try {
		return callback(null, Yaml.safeLoad(fileString));
	} catch (err) {
		return callback(err);
	}
}
259381
def _parse(self):
        
        with open(self.path, "rt") as reader:
            return ast.parse(reader.read(), filename=self.path)
1082893
def parse_file(self,filename):
        """"""
        try:
            return self.rProgram.ignore(cStyleComment).parseFile(filename, parseAll=True)
        except SemanticException as err:
            print(err)
            exit(3)
        except ParseException as err:
            print(err)
            exit(3)
1120839
def parse_from_file(filename, nodata=False):
    
    header = None
    with open(filename, "rb") as file:
        header = read_machine_header(file)
        meta_raw = file.read(header['meta_len'])
        meta = __parse_meta(meta_raw, header)
        data = b''
        if not nodata:
            data = __decompress(meta, file.read(header['data_len']))

        return header, meta, data
1233742
def _Parse(self):
    """"""
    root_file_entry = self._file_system.GetRootFileEntry()

    for sub_file_entry in root_file_entry.sub_file_entries:
      volume = APFSVolume(sub_file_entry)
      self._AddVolume(volume)
1258097
def get_file_contents(filename):
    
    data = None
    try:
        with open(filename) as pf:
            data = pf.read()
    except IOError:
        # File not found, return None
        pass
    return data
178258
function getFile(filepath) {
	var fileObj = {
			path: filepath,
			content: null
	};
    try {
        fs.accessSync(filepath, fs.F_OK);
    } catch(e) {
			console.log(e.message);
        return fileObj;
    }
		fileObj.content = fs.readFileSync(filepath, 'utf-8').trim();
		return fileObj;
}
388304
def parse_file(path, target_ext=nil)
      return nil if path.nil?
      return nil if File.directory? path
      _load_from_file path, target_ext
      # if File.directory? path
      #   _load_from_directory path
      # else
      #   _load_from_file path, target_ext
      # end
    end
822463
def parse_shebang_from_file(path):
    """"""
    if not os.path.lexists(path):
        raise ValueError('{} does not exist.'.format(path))
    if not os.access(path, os.X_OK):
        return ()

    with open(path, 'rb') as f:
        return parse_shebang(f)
507308
def parse(self, file_name):
        
        root = ET.parse(file_name).getroot()
        return self._parse(root)
1238278
def parsefile(self, filename):
        
        with open(filename, 'rb') as fd:
            return self.parse(fd.read())
88916
private function parseFile()
    {
        $contents = file_get_contents($this->getPath());
        $lines = new Collection(explode("\n", $contents));
        $result = new Collection();

        $lines->filter(function ($value) {
            return $value;
        })->each(function ($value) use ($result) {
            preg_match('/([a-zA-Z_-]+)\=(.+)/', $value, $regexResult);

            array_shift($regexResult);
            $result->push(new Collection($regexResult));
        });

        return $result;
    }