European-XFEL / h5glance

Explore HDF5 files in terminal & HTML views
BSD 3-Clause "New" or "Revised" License
68 stars 8 forks source link

Provide text view in IPython as well as HTML #21

Closed takluyver closed 4 years ago

takluyver commented 4 years ago

Screenshot of HDF5 group in terminal IPython

This provides a single-layer view of HDF5 groups in terminal IPython. Why a single layer?

  1. It's not really useful to print out a list of hundreds of nested groups with no way of controlling it. The HTML interface has expandable bits, and the terminal interface uses a pager to make it searchable. This could still be a problem if you have many entries in one group; I haven't tried to tackle that yet.
  2. The notebook creates both the HTML & text representations (for export to other formats), and walking all the subgroups twice would slow it down.

The minimum Python version is increased to 3.6 (f strings!).