Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_group():
with h5py_wrapper.File(h5test_file) as f:
h5group = f['/Output']
t1 = h5group['MomentArm'] # Standard h5py notation
t2 = h5group['Model/Knee/Pos']
t3 = h5group['Model.Knee.Pos']
def test_file():
with h5py_wrapper.File(h5test_file) as f:
t1 = f['/Output/MomentArm'] # Standard h5py notation
t2 = f['Output.MomentArm'] # dot notation
t3 = f['Main.MyStudy.Output.Model.Knee.Pos'] # dot notation with full path
Examples
--------
>>> for (h5, filename) in anydatah5_generator():
print(h5)
"""
from . import h5py_wrapper
if folder is None:
folder = str(os.getcwd())
def func(item):
return re.match(item, match, flags=re.IGNORECASE)
filelist = filter(func, os.listdir(folder))
for filename in filelist:
try:
with h5py_wrapper.File(op.join(folder, filename)) as h5file:
yield (h5file, filename)
except IOError:
pass