Hi Anthony,

On 05/19/2012 08:12 PM, Anthony Scopatz wrote:
> Why don't you try something like:
>
> bar = filter(x.description == VideoNode for x in f.walkNodes('/', 'Table'))
>
> or
>
> bar = filter(x.dtype == VideoNode._v_dtype for x in f.walkNodes('/',
> 'Table'))
>
> to compare the dtype / description directly?

Oh. *g*
This is exactly what I was looking for. I did not know how to use the 
class in a comparison for this.

Thank you!
Uwe

> On May 18, 2012 8:00 AM, "Uwe Mayer" <uwe.ma...@dfki.de
> <mailto:uwe.ma...@dfki.de>> wrote:
>
>     Hi,
>
>     I have several leaf nodes of the same table dtype:
>
>     class VideoNode(tables.IsDescription):
>         ...
>
>     Not all tables in the hdf5 file are of the same type, however. How
>     do I iterate
>     over all leafes which are tables of the above class, while ignoring
>     tables with
>     different signatures?
>
>     i.e. I'd like to write something like:
>     <code>
>     f = tables.openFile(...)
>     foo = f.walkNodes('/', classname='VideoNode')
>     </code>
>     which does not work because only the class name is "Table"...
>
>     or
>     <code>
>     bar = filter(isinstance(x, VideoNode) for x in f.walkNodes('/',
>     'Table')))
>     </code>
>
>     which does not work, because x is never an instance of VideoNode.
>
>     Any ideas?
>
>     Thanks in advance
>     Uwe
>
>
>     
> ------------------------------------------------------------------------------
>     Live Security Virtual Conference
>     Exclusive live event will cover all the ways today's security and
>     threat landscape has changed and how IT managers can respond.
>     Discussions
>     will include endpoint security, mobile security and the latest in
>     malware
>     threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>     _______________________________________________
>     Pytables-users mailing list
>     Pytables-users@lists.sourceforge.net
>     <mailto:Pytables-users@lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/pytables-users
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
>
> _______________________________________________
> Pytables-users mailing list
> Pytables-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pytables-users



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to