Zecale - Reconciling Privacy and Scalability on Smart-Contract Chains  0.5
Reference implementation of the Zecale protocol by Clearmatics
utils.py
Go to the documentation of this file.
1 # Copyright (c) 2015-2022 Clearmatics Technologies Ltd
2 #
3 # SPDX-License-Identifier: LGPL-3.0+
4 
5 import os
6 from os.path import normpath, join, dirname, exists
7 
8 
9 def get_zecale_dir() -> str:
10  """
11  Return the repository root either in ZECALE env var, or relative to this
12  file.
13  """
14  zecale_dir = os.environ.get(
15  "ZECALE",
16  normpath(join(dirname(__file__), "..", "..", "..")))
17  # Nasty, but this assert should protect against this path going out of date
18  assert exists(join(zecale_dir, "client", "zecale", "core", "utils.py"))
19  return zecale_dir
zecale.core.utils.get_zecale_dir
str get_zecale_dir()
Definition: utils.py:9