Interconvert a ctypes.Structure to/from a binary string?

2008-08-01 Thread Andrew Lentvorski
Basically, I'd like to use the ctypes module as a much more descriptive "struct" module. Is there a way to take a ctypes.Structure-based class and convert it to/from a binary string? Thanks, -a -- http://mail.python.org/mailman/listinfo/python-list

Class definition attribute order

2008-08-01 Thread Andrew Lentvorski
How do I determine the order of definition of class attributes? For example, if I have a class class Test(object): y = 11 x = 22 How do I tell that y was defined before x? Thanks, -a -- http://mail.python.org/mailman/listinfo/python-list