A Thursday 19 November 2009 17:42:03 cyril.girau...@free.fr escrigué:
> Here are the files with an external link.
[clip]

Thanks for the files.  I've been doing some tests with them, and after 
applying the next patch:

"""
Index: src/utils.c
===================================================================
--- src/utils.c (revision 4264)
+++ src/utils.c (working copy)
@@ -274,7 +274,7 @@
 /*     CHECK(ret, FAIL, "H5Gget_objinfo"); */

     strname = PyString_FromString(name);
-    if (statbuf.type == H5G_GROUP) {
+    if ((statbuf.type == H5G_GROUP) || (statbuf.type == H5G_UDLINK)) {
       PyList_Append(out_info[0], strname);
     }
     else if (statbuf.type == H5G_DATASET) {
"""

it *seems* to recognize external links:

In [1]: import tables

In [2]: f = tables.openFile('file1.h5')

In [3]: [g for g in f.walkGroups('/')]
Out[3]:
[/ (RootGroup) ''
  children := ['mesh' (Group)],
 /mesh (Group) ''
  children := ['mesh1' (Group), 'mesh2' (Group)],
 /mesh/mesh1 (Group) ''
  children := [],
 /mesh/mesh2 (Group) ''
  children := ['mesh22' (Group), 'mesh21' (Group)],
 /mesh/mesh2/mesh21 (Group) ''
  children := [],
 /mesh/mesh2/mesh22 (Group) ''
  children := []]

However, it gives some strange errors in HDF5:

HDF5-DIAG: Error detected in HDF5 (1.8.4-pre1) thread 0:
  #000: H5Gdeprec.c line 777 in H5Giterate(): group iteration failed
    major: Symbol table                                             
    minor: Iteration failed                                         
  #001: H5G.c line 1521 in H5G_iterate(): unable to open group      
    major: Symbol table                                             
    minor: Can't open object                                        
  #002: H5G.c line 947 in H5G_open_name(): group not found          
    major: Symbol table                                             
    minor: Object not found                                         
  #003: H5Gloc.c line 468 in H5G_loc_find(): can't find object      
    major: Symbol table                                             
    minor: Object not found                                         
  #004: H5Gtraverse.c line 877 in H5G_traverse(): internal path traversal 
failed
    major: Symbol table                                                         
    minor: Object not found                                                     
  #005: H5Gtraverse.c line 776 in H5G_traverse_real(): component not found      
    major: Symbol table                                                         
    minor: Object not found                                                     
HDF5-DIAG: Error detected in HDF5 (1.8.4-pre1) thread 0:                        
  #000: H5Gdeprec.c line 777 in H5Giterate(): group iteration failed            
    major: Symbol table                                                         
    minor: Iteration failed                                                     
  #001: H5G.c line 1521 in H5G_iterate(): unable to open group                  
    major: Symbol table                                                         
    minor: Can't open object                                                    
  #002: H5G.c line 947 in H5G_open_name(): group not found
    major: Symbol table
    minor: Object not found
  #003: H5Gloc.c line 468 in H5G_loc_find(): can't find object
    major: Symbol table
    minor: Object not found
  #004: H5Gtraverse.c line 877 in H5G_traverse(): internal path traversal 
failed
    major: Symbol table
    minor: Object not found
  #005: H5Gtraverse.c line 776 in H5G_traverse_real(): component not found
    major: Symbol table
    minor: Object not found

This is somewhat strange :-/  Cyril, could you please send me your Fortran 
code so I can put a C version in place?  My idea is to replicate your code 
behavior in PyTables.

Thanks,

-- 
Francesc Alted

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to