Dump an HDF5 group.
(pgroup, sort=False)
| 67 | |
| 68 | |
| 69 | def dump_group(pgroup, sort=False): |
| 70 | """Dump an HDF5 group.""" |
| 71 | node_kinds = pgroup._v_file._node_kinds[1:] |
| 72 | what = pgroup._f_walk_groups() |
| 73 | if sort: |
| 74 | what = sorted(what, key=operator.attrgetter("_v_pathname")) |
| 75 | for group in what: |
| 76 | print(str(group)) |
| 77 | if options.showattrs: |
| 78 | print(f" {group._v_attrs!r}") |
| 79 | for kind in node_kinds: |
| 80 | for node in group._f_list_nodes(kind): |
| 81 | if options.verbose or options.dump: |
| 82 | dump_leaf(node) |
| 83 | else: |
| 84 | print(str(node)) |
| 85 | |
| 86 | |
| 87 | def _get_parser(): |
no test coverage detected