[issue29131] Calling printf from the cdll does not print the full string

2017-01-02 Thread mike peremsky

mike peremsky added the comment:

I appreciate the feedback, but as I had originally mentioned. I am following 
the "Gray Hat Python - Python Programming for Hackers and Reverse Engineers" 
book and was attempting to use Python 3 instead of Python 2 (as was used in the 
book). The cdll code is taken from the book itself. There is nothing that I 
personally plan on doing with this cdll other than to follow along in the book 
and become educated.

"Though if you do really want to use the (very) old msvcrt DLL rather than the 
proper functionality"

If there are better libraries to use I would be interested in knowing what 
those are. What is the "proper functionality"?. I like to educate myself and 
would like to attempt to follow the book using Python 3 and current libraries.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29131>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29131] Calling printf from the cdll does not print the full string

2017-01-01 Thread mike peremsky

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 <rep...@bugs.python.org>
<http://bugs.python.org/issue29131>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com