@@ -494,32 +494,7 @@ def __len__(self):
494
494
return len (self .groups ())
495
495
496
496
def __unicode__ (self ):
497
- output = '%s\n File path: %s\n ' % (type (self ), pprint_thing (self ._path ))
498
- if self .is_open :
499
- lkeys = sorted (list (self .keys ()))
500
- if len (lkeys ):
501
- keys = []
502
- values = []
503
-
504
- for k in lkeys :
505
- try :
506
- s = self .get_storer (k )
507
- if s is not None :
508
- keys .append (pprint_thing (s .pathname or k ))
509
- values .append (
510
- pprint_thing (s or 'invalid_HDFStore node' ))
511
- except Exception as detail :
512
- keys .append (k )
513
- values .append ("[invalid_HDFStore node: %s]"
514
- % pprint_thing (detail ))
515
-
516
- output += adjoin (12 , keys , values )
517
- else :
518
- output += 'Empty'
519
- else :
520
- output += "File is CLOSED"
521
-
522
- return output
497
+ return '%s\n File path: %s\n ' % (type (self ), pprint_thing (self ._path ))
523
498
524
499
def __enter__ (self ):
525
500
return self
@@ -1161,6 +1136,35 @@ def copy(self, file, mode='w', propindexes=True, keys=None, complib=None,
1161
1136
1162
1137
return new_store
1163
1138
1139
+ def info (self ):
1140
+ """return detailed information on the store"""
1141
+ output = '%s\n File path: %s\n ' % (type (self ), pprint_thing (self ._path ))
1142
+ if self .is_open :
1143
+ lkeys = sorted (list (self .keys ()))
1144
+ if len (lkeys ):
1145
+ keys = []
1146
+ values = []
1147
+
1148
+ for k in lkeys :
1149
+ try :
1150
+ s = self .get_storer (k )
1151
+ if s is not None :
1152
+ keys .append (pprint_thing (s .pathname or k ))
1153
+ values .append (
1154
+ pprint_thing (s or 'invalid_HDFStore node' ))
1155
+ except Exception as detail :
1156
+ keys .append (k )
1157
+ values .append ("[invalid_HDFStore node: %s]"
1158
+ % pprint_thing (detail ))
1159
+
1160
+ output += adjoin (12 , keys , values )
1161
+ else :
1162
+ output += 'Empty'
1163
+ else :
1164
+ output += "File is CLOSED"
1165
+
1166
+ return output
1167
+
1164
1168
# private methods ######
1165
1169
def _check_if_open (self ):
1166
1170
if not self .is_open :
0 commit comments