Never done it myself but I would suggest writing the c struct to a temp file.

Then call the python script using normal system call in C
(http://en.wikipedia.org/wiki/System_%28C_standard_library%29)
and read the temp file using struct module from python
http://docs.python.org/library/struct.html

Maybe somebody else has code snippet they can share? or better approach.

On Thu, Nov 19, 2009 at 9:58 AM, a h <ah.k...@gmail.com> wrote:
> Hi all
>
> I want to know that how do I pass an C structure into python script.
> Actually my problem is
> 1. how do I call python script from C application ,in which I can pass C
> structure
> 2. how do I take that C structure into an python script
>
> actually i have to write an python script which take an C structure and
> using pyasn, it encode that structure and dump the encoded data.
> also please provide some code snippets.
>
> Thanks
> ah
> _______________________________________________
> python-win32 mailing list
> python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
>
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to