[Python] [ctypes] ctypes について

>>> from ctypes import *
>>> class DATA(Structure):
	_fields_ = [
		('name', c_char_p, ),
		]

	
>>> data = DATA()
>>> data.name = (c_char * 100)()

Traceback (most recent call last):
  File "<pyshell#9>", line 1, in <module>
    data.name = (c_char * 100)()
TypeError: incompatible types, c_char_Array_100 instance instead of c_char_p instance
>>> data.name = addressof((c_char * 100)())

イケテネェェェェェ

あと http://wiki.python.org/moin/ctypes は必見
でも何でも ctypes から叩こうとするのはやめた方がいいと思います。俺とか