Passing a C Struct and accessing/modifying its values

Lance Duivenbode huku at iinet.net.au
Fri Dec 27 06:21:12 EST 2002


Hi,

I'm currently writing a multiple game log parser in C that's called 
Multistat (http://multistat.sourceforge.net). Multistat is a flexible 
plugin based application, and given this I would like to be able to 
create a plugin (or plugins) that will allow parsing etc to be done by 
scripting languages (i.e. python and perl for the moment).

To do this I need to pass C structure that contains pointers and other C 
structures. Can python do this or do I have to serialize the data into 
XML or some other meta-language first? I've attached the header file 
that contains the structs (I'm interested in the GameData, PlayerData, 
and TeamData structs - NOTE: These all contain or are part of linked lists).

Thanks,

Lance

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: multistat.h
URL: <http://mail.python.org/pipermail/python-list/attachments/20021227/c16a8479/attachment.h>


More information about the Python-list mailing list