Returns a tuple of (class, instance) if modname!classname exists
(self)
| 5231 | return |
| 5232 | |
| 5233 | def __get_structure_class(self) -> Type: |
| 5234 | """Returns a tuple of (class, instance) if modname!classname exists""" |
| 5235 | fpath = self.module_path |
| 5236 | spec = importlib.util.spec_from_file_location(fpath.stem, fpath) |
| 5237 | module = importlib.util.module_from_spec(spec) |
| 5238 | sys.modules[fpath.stem] = module |
| 5239 | spec.loader.exec_module(module) |
| 5240 | _class = getattr(module, self.name) |
| 5241 | return _class |
| 5242 | |
| 5243 | def apply_at(self, address: int, max_depth: int, depth: int = 0) -> None: |
| 5244 | """Apply (recursively if possible) the structure format to the given address.""" |