From: Nicholas R. <nj...@il...> - 2010-03-05 02:00:54
|
In article <71B...@gm...>, josu jugo <jos...@gm...> wrote: > >>> libc = ctypes.CDLL("libc.dylib") > >>> print libc.strlen("hello") > > NotImplementedError: variadic functions not supported yet; specify a > parameter list > > I don't know what is the mean of this error. Is it possible to use ctypes in > some examples in this moment? What ctypes is trying to tell you is that it doesn't know what the argument types for strlen are. So you need to tell it: >>> libc.strlen.argtypes = [ctypes.c_char_p] >>> libc.strlen('hello') 5 -- Nicholas Riley <nj...@il...> |