Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

        def load_string(file_path, default=None, limit=1024):
    if not os.path.exists(file_path):
        return default
    try:
        f = open(file_path, 'r')
        ret = f.read(limit)
        f.close()
    except:
        return default
    if ret == '':
        return default
    return ret
        


src/h/g/hgsubversion-1.6/hgsubversion/maps.py   hgsubversion(Download)
        # must load youngest file first, or else self._load() can
        # clobber the info
        _yonngest_str = util.load_string(self.ypath, '0')
        self._youngest = int(_yonngest_str.strip())
        self.oldest = 0