[New-bugs-announce] [issue29131] Calling printf from the cdll does not print the full string

mike peremsky report at bugs.python.org
Mon Jan 2 00:45:41 EST 2017


New submission from mike peremsky:

I am going throught he Gray Hat Python book and installed Python 3.7 (32-bit) on a windows x64 machine. The following code will only print the first character of the passed string argument. The same code run on Python 2.7 will print the correct string value.


from ctypes import *
 
msvcrt = cdll.msvcrt
 
message_string = "Hello World!\n"
msvcrt.printf("Testing: %s", message_string)
 
Output:
T

----------
components: ctypes
messages: 284464
nosy: mperemsky
priority: normal
severity: normal
status: open
title: Calling printf from the cdll does not print the full string
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29131>
_______________________________________


More information about the New-bugs-announce mailing list