parent
b05003d97b
commit
cfb016efdd
1 changed files with 6 additions and 4 deletions
@ -1,9 +1,11 @@ |
|||||||
import os |
import os |
||||||
import capnp |
import capnp |
||||||
|
from importlib.resources import as_file, files |
||||||
|
|
||||||
CEREAL_PATH = os.path.dirname(os.path.abspath(__file__)) |
|
||||||
capnp.remove_import_hook() |
capnp.remove_import_hook() |
||||||
|
|
||||||
log = capnp.load(os.path.join(CEREAL_PATH, "log.capnp")) |
with as_file(files("cereal")) as fspath: |
||||||
car = capnp.load(os.path.join(CEREAL_PATH, "car.capnp")) |
CEREAL_PATH = fspath.as_posix() |
||||||
custom = capnp.load(os.path.join(CEREAL_PATH, "custom.capnp")) |
log = capnp.load(os.path.join(CEREAL_PATH, "log.capnp")) |
||||||
|
car = capnp.load(os.path.join(CEREAL_PATH, "car.capnp")) |
||||||
|
custom = capnp.load(os.path.join(CEREAL_PATH, "custom.capnp")) |
||||||
|
Loading…
Reference in new issue