I'm pretty new to python and ctypes. I'm trying to accomplish a seemingly easy task but am getting unexpected results. I'm trying to pass a string to a c function so I'm using the c_char_p type but it's giving me an error message. To simply it, this is whats happening:
>>>from ctypes import * >>>c_char_p("hello world") Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: string or integer address expected instead of str instance What's going on here?