Last active
December 16, 2015 06:28
-
-
Save moble/5391305 to your computer and use it in GitHub Desktop.
Add '.dir' to the end of every group in the root of an h5 file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import sys | |
import h5py | |
for filename in sys.argv[1:] : | |
with h5py.File(filename, 'r+') as f : | |
for group in list(f) : | |
f[group+'.dir'] = f[group] | |
del(f[group]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment