Did I find the right examples for you? yes no      Crawl my project      Python Jobs

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

        def read(cache_name):
  lines = None
  try:
    f = open(cache_name, "r")
    try:
      lines = f.readlines()
    finally:
      f.close()
  except IOError:
    pass
  return lines
        


src/a/l/alfred-movies-workflow-HEAD/source/omdb.py   alfred-movies-workflow(Download)
def read_from_cache(the_id):
  global CACHE_NAME
  lines = cache.read(CACHE_NAME)
  if lines is not None and lines[0].strip() == the_id:
    return lines[1]