Python3k ctypes printf
Posted
by dsaccount1
on Stack Overflow
See other posts from Stack Overflow
or by dsaccount1
Published on 2010-04-14T10:30:47Z
Indexed on
2010/04/14
10:33 UTC
Read the original article
Hit count: 336
printf returns 1 instead of Hello World! which is the desired result. I googled it and think its because of the changes in the way sequences are treated. Python-3000 Possible py3k problem resolved.
import ctypes
msvcrt=ctypes.cdll.msvcrt
string=b"Hello World!"
msvcrt.printf("%s", string)
© Stack Overflow or respective owner