[Baypiggies] Need some help with ctypes unions

Tony Cappellini cappy2112 at gmail.com
Tue Aug 27 23:25:20 CEST 2013


Having read the docs for ctypes as well as Thomas Heller's tutorial,
both claim ctypes works with unions, but neither provide any examples.

I would like to implement this C union in ctypes Python.

Here's the C code.

http://pastebin.com/u27ymtgA

Be sure to read the two comments below the closing curly brace of main().


If you've used unions via ctypes before, would you send me a hint?


Thanks

Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20130827/b683d42a/attachment.html>


More information about the Baypiggies mailing list