from .node import Node ## Wrapper around a Node tree. class GameRecord: def __init__(self, root=None): self.root = root or Node() self._gameInfoNode = next(root.listGINodes()) def export(self): return self.root.export() def set(self, name, value): self._gameInfoNode.setProp(name, value) def get(self, name, default=None): return self._gameInfoNode.getProp(name, default)