當前位置: 首頁>>代碼示例>>Python>>正文


Python msvcrt.SEM_NOGPFAULTERRORBOX屬性代碼示例

本文整理匯總了Python中msvcrt.SEM_NOGPFAULTERRORBOX屬性的典型用法代碼示例。如果您正苦於以下問題:Python msvcrt.SEM_NOGPFAULTERRORBOX屬性的具體用法?Python msvcrt.SEM_NOGPFAULTERRORBOX怎麽用?Python msvcrt.SEM_NOGPFAULTERRORBOX使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在msvcrt的用法示例。


在下文中一共展示了msvcrt.SEM_NOGPFAULTERRORBOX屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: setup_tests

# 需要導入模塊: import msvcrt [as 別名]
# 或者: from msvcrt import SEM_NOGPFAULTERRORBOX [as 別名]
def setup_tests(ns):
    if ns.testdir:
        # Prepend test directory to sys.path, so runtest() will be able
        # to locate tests
        sys.path.insert(0, os.path.abspath(ns.testdir))
    if ns.huntrleaks:
        # Avoid false positives due to various caches
        # filling slowly with random data:
        warm_caches()
    if ns.memlimit is not None:
        support.set_memlimit(ns.memlimit)
    if ns.threshold is not None:
        import gc
        gc.set_threshold(ns.threshold)
    if ns.nowindows:
        print('The --nowindows (-n) option is deprecated. '
              'Use -vv to display assertions in stderr.')
    try:
        import msvcrt
    except ImportError:
        pass
    else:
        msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS|
                            msvcrt.SEM_NOALIGNMENTFAULTEXCEPT|
                            msvcrt.SEM_NOGPFAULTERRORBOX|
                            msvcrt.SEM_NOOPENFILEERRORBOX)
        try:
            msvcrt.CrtSetReportMode
        except AttributeError:
            # release build
            pass
        else:
            for m in [msvcrt.CRT_WARN, msvcrt.CRT_ERROR, msvcrt.CRT_ASSERT]:
                if ns.verbose and ns.verbose >= 2:
                    msvcrt.CrtSetReportMode(m, msvcrt.CRTDBG_MODE_FILE)
                    msvcrt.CrtSetReportFile(m, msvcrt.CRTDBG_FILE_STDERR)
                else:
                    msvcrt.CrtSetReportMode(m, 0) 
開發者ID:ShikyoKira,項目名稱:Project-New-Reign---Nemesis-Main,代碼行數:40,代碼來源:regrtest.py


注:本文中的msvcrt.SEM_NOGPFAULTERRORBOX屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。