2024-04-29 07:08:23 发布
网友
我正在从一个hdf5文件中读取组,其中一些组成员是外部链接。我希望能够确定哪些组成员是外部链接,然后忽略它们以便进一步阅读。在
示例代码:
f = h5py.File(filename, 'r') data = f['header'] for p in date.keys: (if p is an external link, detect it here!)
工作代码:
f = h5py.File(filename, 'r') data = f['header'] for p in date.keys: if bool('h5py._hl_.group.ExternalLink' in str(type(data.get(p, getlink=True))))): print 'External link found!'
漂亮的Python,我知道。。。;)
工作代码:
漂亮的Python,我知道。。。;)
相关问题 更多 >
编程相关推荐