Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment: 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. ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7346> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com