0

I have an HDF5 file and want to periodically check its shape with Apscheduler.

>>> file = tb.open_file('data.h5', 'r')
>>> print( file.root.group01.table01[:].shape )
(76858,)

The problem is that the table's shape is not updated even after new data is added to the table. Therefore, it's always (76858,), which is loaded for the first time, even after I delete the file object(del file) and open it again.

I remember reading that Python keeps some values so that it can use the values later again without the same repetitive procedures. Is it the same case? How can I make it reload the file and show updated table information?

maynull
  • 1,936
  • 4
  • 26
  • 46
  • 1
    Possible duplicate of [python refresh/reload](https://stackoverflow.com/questions/1517038/python-refresh-reload) – Tyler Cowan Mar 21 '18 at 16:58
  • @TylerCowan I don't think he is interested in the `reload` command, which is reloading modules. – user1767754 Mar 21 '18 at 16:59
  • @user1767754 I believe that since recompilation happens he actual would want this, if I am wrong can you offer another solution? – Tyler Cowan Mar 21 '18 at 22:38

0 Answers0