Jan-02-2017, 05:13 AM
I have just installed python 3.6 (32-bit), eclipse, and PyDev. I am going through the Gray Hat Python book (which uses 2.5) and cannot get the dll call for printf to work properly. I have tried to find a solution to no avail.
The code is as follows. It will only print the first character of the output string to the console.
The code is as follows. It will only print the first character of the output string to the console.
from ctypes import * msvcrt = cdll.msvcrt msvcrt.printf message_string = "Hello World!\n" msvcrt.printf("Testing: %s", message_string) Output: T