Dear Susheel,

Please do not write to me directly, as your question (and answers) can 
serve to someone else.  It is much better that you send future 
questions to the pytables user's list:

https://lists.sourceforge.net/lists/listinfo/pytables-users

Now, see my answer below.

A Wednesday 05 November 2008, escriguéreu:
> Dear Francesc,
>
> Sorry for the intrusion, I have been trying place a fixed and
> variable length field structure within a HDF5 table. I have tried
> various methods to do so within the C API and pytables using the
> hdf-1.6.6 and pytables-2.03 library. If it does not take too much
> time, could you please send me some sample C and python code that
> will do the same. The sample structure I'd like to read/write is:
>
> typedef struct s2 {
>     int int_val;
> } s2;
>
> typedef struct s2_list {
>     s2 s2_val;
>     s2 * next;
> } s2_list;
>
> struct s1 {
>     int int_val;
>     int int_array[5];
>     s2 s2_val;
>     s2 s2_array[5];
>    s2_list s2_list_val;
> }
>
> I need to write this from C code and read from pytables.

It is currently not possible to include variable length types in table 
objects.  For this, you should use VLArrays and combine them with 
Tables (or any other Leaf object).

There was a question similar to yours posted to the pytables list some 
weeks ago:

http://www.mail-archive.com/[email protected]/msg01015.html

Read the complete thread and hopefully you will get more clues on what 
approach to follow.  Please write again in case you don't understand 
something.

Cheers,

-- 
Francesc Alted

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to