Ezio Melotti added the comment: I just noticed that regrtest also has a --nowindows flag that uses SetErrorMode (see Lib/test/regrtest.py:490). The implementation is a bit different: 1) it uses msvcrt instead of going through ctypes.windll.kernel32; 2) it specifies SEM_FAILCRITICALERRORS, SEM_NOALIGNMENTFAULTEXCEPT, and SEM_NOOPENFILEERRORBOX in addition to SEM_NOGPFAULTERRORBOX; 3) it doesn's seem to save and restore the previous error mode; 4) it has additional calls to CrtSetReportMode and CrtSetReportFile; 5) it doesn't check the platform and thus raises an ImportError if msvcrt is missing;
Do you think this flag should be removed? Should I improve my context manager with any of these things? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11732> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com