This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients BreamoreBoy, amaury.forgeotdarc, ecir.hana
Date 2010-09-28.23:20:59
SpamBayes Score 2.9298262e-09
Marked as misclassified No
Message-id <1285716061.27.0.391084229049.issue7346@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, mingw uses a different C runtime (msvcrt.dll) than Python (msvcr90.dll), so file descriptors are completely different and this causes the error.

I can see two solutions:

- Use the same compiler as python26; I've also heard about a way to force mingw to use msvcr90.dll.

- Avoid to pass mingw file descriptors to the python interpreter.  This requires more work: create a PyTypeObject that mimics a file object, and set this as sys.stdout. It should be enough to implement .write() and .flush(); you can use the C system calls (fwrite, fflush or whatever) there, and the file descriptors are used in a consistent way.
History
Date User Action Args
2010-09-28 23:21:01amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, ecir.hana, BreamoreBoy
2010-09-28 23:21:01amaury.forgeotdarcsetmessageid: <1285716061.27.0.391084229049.issue7346@psf.upfronthosting.co.za>
2010-09-28 23:21:00amaury.forgeotdarclinkissue7346 messages
2010-09-28 23:20:59amaury.forgeotdarccreate