Message184123
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? |
|
Date |
User |
Action |
Args |
2013-03-14 01:21:26 | ezio.melotti | set | recipients:
+ ezio.melotti, loewis, terry.reedy, vstinner, sable, brian.curtin, skrah, catalin.iacob, python-dev |
2013-03-14 01:21:25 | ezio.melotti | set | messageid: <1363224085.95.0.302289253939.issue11732@psf.upfronthosting.co.za> |
2013-03-14 01:21:25 | ezio.melotti | link | issue11732 messages |
2013-03-14 01:21:25 | ezio.melotti | create | |
|