Reading struct with structs

Baillargeon, Sonny Sonny.Baillargeon at bmonb.com
Tue Oct 12 17:27:29 EDT 2004


I am trying to read in a C struct file that contains sub-structs as part
as the data definition.  For example:
	int	a	/* 4 bytes */
	int_t	b	/* custom struct */
	blah_t	c	/* custom struct */
	bing_t	d	/* custom struct */

The custom structs are arbitrary.  The struct module only allows me to
have strict C datatypes.  How can I read in a struct recursively given I
have to feed the struct.unpack?

Thanks,
Sonny


<FONT SIZE = 1>****************************************************************************
This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Unless otherwise stated, opinions expressed in this e-mail are those of the author and are not endorsed by the author's employer.</FONT>




More information about the Python-list mailing list