Message184123
| Author |
ezio.melotti |
| Recipients |
brian.curtin, catalin.iacob, ezio.melotti, loewis, python-dev, sable, skrah, terry.reedy, vstinner |
| Date |
2013年03月14日.01:21:25 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1363224085.95.0.302289253939.issue11732@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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? |
|