memacc 0.1.11

Memory access functions.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from pathlib import Path


class PathOutput:
    """Path from crate's root."""

    def __init__(self, path_str: str) -> None:
        assert isinstance(path_str, str)
        self.path = Path(__file__).parent.parent / Path(path_str)

    def write(self, text: str) -> None:
        assert isinstance(text, str)
        with self.path.open("w") as stream:
            stream.write(text)