Changeset 1450
- Timestamp:
- Dec 13, 2013 6:19:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
hdf5_exchange/h5py_examples/src/h5toText/h5toText.py
r520 r1450 6 6 $Id$ 7 7 ''' 8 9 10 ########### SVN repository information ###################11 # $Date$12 # $Author$13 # $Revision$14 # $URL$15 # $Id$16 ########### SVN repository information ###################17 8 18 9 … … 61 52 f = h5py.File(self.filename, 'r') 62 53 for value in f.itervalues(): 63 if str(type(value)) in ("<class 'h5py.highlevel.Group'>"):54 if isinstance(value, h5py.Group): 64 55 if 'NX_class' in value.attrs: 65 56 v = value.attrs['NX_class'] … … 81 72 print indentation + name + nxclass 82 73 self.showAttributes(obj, indentation) 83 group_equivalents = ("<class 'h5py.highlevel.File'>", "<class 'h5py.highlevel.Group'>")84 74 # show datasets (and links) first 85 75 for itemname in sorted(obj): 86 76 value = obj[itemname] 87 if str(type(value)) not in group_equivalents:77 if not isinstance(value, h5py.Group): 88 78 self.showDataset(value, itemname, indentation = indentation+" ") 89 79 # then show things that look like groups 90 80 for itemname in sorted(obj): 91 81 value = obj[itemname] 92 if str(type(value)) in group_equivalents:82 if isinstance(value, h5py.Group): 93 83 self.showGroup(value, itemname, indentation = indentation+" ") 94 84 … … 230 220 mc.array_items_shown = limit 231 221 mc.report() 222 223 224 ########### SVN repository information ################### 225 # $Date$ 226 # $Author$ 227 # $Revision$ 228 # $URL$ 229 # $Id$ 230 ########### SVN repository information ###################
Note: See TracChangeset
for help on using the changeset viewer.