I have created external links leading from one hdf5 file to another using pytables. My question is how to de-reference it in a loop?
for example:
Let's assume file_name = "collection.h5"
, where external links are stored
I created external links under the root node and when i traverse the nodes under the root, i get the following output :
/link1 (ExternalLink) -> /files/data1.h5:/weights/Image
/link2 (ExternalLink) -> /files/data2.h5:/weights/Image
and so on,
I know that for de-referencing a link, it can be done like this, using natural naming in the below manner:
f = open_file('collection.h5',mode='r')
plink1 = f.root.link1()
plink2 = f.root.link2()
but I want to do this in a for-loop, any help regarding this?