Пример #1
0
def getShelf():
  """
    Return an instance of shelve.Shelf, in which we store hashes
    of the previously processed datasets.
  """
  path = os.path.join(util.root(), "db", "shelf")
  return shelve.open(path)
Пример #2
0
def getConfig():
  """
    Reads JSON configuration from etc/config.json
  """
  with open(os.path.join(util.root(), "etc", "config.json"), "r") as configFile:
    return json.loads(configFile.read())