New submission from FreedomKnight:
the code is simple, so i paste all of mycode
#!/usr/bin/env python3
from ctypes import *
cdll.LoadLibrary(libc.so.6)
libc = CDLL(libc.so.6)
libc.printf(hello\n)
result:
h
expect result:
hello
plateform:
fedora 19 x64
python3 (3.3.2)
Georg Brandl added the comment:
In Python 3, hello\n is a Unicode string. printf() expects a byte string, so
you should use bhello\n (or s.encode() for string object named s).
--
nosy: +georg.brandl
resolution: - invalid
status: open - closed
___