[Python Glasgow] PyTables subgroup members

Hedieh Ebrahimi hedieh.ebrahimi at amphos21.com
Wed Oct 30 09:48:20 CET 2013


Hi,

Does anybody how i can get in PyTables as structure as below

/
/GroupA1
   subGroupA1B1
/GroupA2
   subGroupA2B1

How can i get the name of the members of subGroupA2B1 in a normal python
list. My problem is I am getting the list with a lot of extra information
while what i really want is to have the just a string which is the name of
second order members .

h5file=tables.open_file(inputFile,mode="a",title=inputFile)
        for group in h5file.walkGroups():
            print(list(group))

This is giving lots of extra iformation which i don´t want such as:
atom := Float64Atom(shape=(), dflt=0.0)
  maindim := 0
  flavor := 'numpy'
  byteorder := 'little'
  chunkshape := None, /Coordinates/Y [m] (Array(29,)) ''
  atom := Float64Atom(shape=(), dflt=0.0)
  maindim := 0
  flavor := 'numpy'
  byteorder := 'little'
  chunkshape := None, /Coordinates/Z [m] (Array(29,)) ''
  atom := Float64Atom(shape=(), dflt=0.0)
  maindim := 0
  flavor := 'numpy'
  byteorder := 'little'
  chunkshape := None]

How can i simply just get the name.

Thanks in Advance for your help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/glasgow/attachments/20131030/f8c38e98/attachment.html>


More information about the Glasgow mailing list