Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

I reproduced the problem on windows, and it is indeed a problem with the
"print" statement, when the write() method reassigns sys.stdout: the
code calls PyFile_WriteString(), then PyFile_SoftSpace on the same
object, which has been freed in your case.
A pair of INCREF/DECREF did the trick. See attached patch.

----------
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file10788/print.patch

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3242>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to