Ok I see your point that C is ambiguous concerning compiler
implementation. I think #pragma pack should work out the padding issue
but I'm not sure if the floating point issue is solvable.
I don't have an idea for solving that one...
On Sun, Oct 18, 2009 at 11:14 PM, Erik Max Francis
Is there a way that Python and C can have a shared definition for a
binary data structure?
It could be nice if:
1. struct or ctypes had a function that could parse a .h/.c/.cpp file
to auto-generate constructors
or
2. a ctypes definition could be exported to a .h file.
So my question is - is
On Sun, Oct 18, 2009 at 2:44 PM, Yuvgoog Greenle ubershme...@gmail.com wrote:
Is there a way that Python and C can have a shared definition for a
binary data structure?
It could be nice if:
1. struct or ctypes had a function that could parse a .h/.c/.cpp file
to auto-generate constructors
I'd like to clarify the use case.
Lets say you're writing a client and a server, one is in python and
the other is C. If these 2 programs need to pass binary information
between them (lets say over a socket) there are 2 options, it could be
nice if you could only write the struct once (either in
On Sun, Oct 18, 2009 at 4:13 PM, Diez B. Roggisch de...@nospam.web.de wrote:
Yuvgoog Greenle schrieb:
Is there a way that Python and C can have a shared definition for a
binary data structure?
It could be nice if:
1. struct or ctypes had a function that could parse a .h/.c/.cpp file
to
geremy condra schrieb:
On Sun, Oct 18, 2009 at 4:13 PM, Diez B. Roggisch de...@nospam.web.de wrote:
Yuvgoog Greenle schrieb:
Is there a way that Python and C can have a shared definition for a
binary data structure?
It could be nice if:
1. struct or ctypes had a function that could parse a
On 08:13 pm, de...@nospam.web.de wrote:
Yuvgoog Greenle schrieb:
Is there a way that Python and C can have a shared definition for a
binary data structure?
It could be nice if:
1. struct or ctypes had a function that could parse a .h/.c/.cpp file
to auto-generate constructors
or
2. a ctypes
Yuvgoog Greenle wrote:
I'd like to clarify the use case.
Lets say you're writing a client and a server, one is in python and
the other is C. If these 2 programs need to pass binary information
between them (lets say over a socket) there are 2 options, it could be
nice if you could only write