Eclipse and Python 3: why does printf() from ctypes display in console output after subsequent print() statements
问题 I am running Eclipse with PyDev and Python 3.2 on Windows Vista, and was working through a tutorial on Python and ctypes. However, I found that when I call msvcrt.printf() to print a string, this is not displayed in the console output for Eclipse until all other print statements have displayed. Here is the exact code I use: from ctypes import * msvcrt = cdll.msvcrt message_string = "Hello Worlds!\n" printf = msvcrt.printf print(printf("Testing: %s".encode('ascii'),message_string.encode('ascii