this doesn't work: class ifinfomsg(ctypes.structure): _fields_ = [ ('ifi_family', ctypes.c_ubyte), ('__ifi_pad', ctypes.c_ubyte), ('ifi_type', ctypes.c_ushort), ('ifi_index', ctypes.c_int), ('ifi_flags', ctypes.c_uint), ('ifi_change', ctypes.c_uint(0xffffffff)) ] it errors with: file "rtnetlink.py", line 243, in <module> class ifinfomsg(ctypes.structure): typeerror: error when calling metaclass bases second item in _fields_ tuple (index 5) must c type however can set values in __init__() : class ifinfomsg(ctypes.structure): _fields_ = [ ('ifi_family', ctypes.c_ubyte), ('__ifi_pad', ctypes.c_ubyte), ('ifi_type', ctypes.c_ushort), ('ifi_index', ctypes.c_int)...
Comments
Post a Comment