Lines Matching defs:sys
12 import sys
37 Py_DEBUG = hasattr(sys, 'gettotalrefcount')
370 import ctypes, sys, time, _thread
392 sys.exit(42)
398 # Avoid a deadlock when sys.settrace steps into threading._shutdown
400 import sys, threading
418 sys.settrace(func)
445 old_interval = sys.getswitchinterval()
448 sys.setswitchinterval(i * 0.0002)
456 sys.setswitchinterval(old_interval)
481 sys.getrefcount(weak_cyclic_object())))
489 sys.getrefcount(weak_raising_cyclic_object())))
543 import sys
552 print("child process ok", file=sys.stderr, flush=True)
595 old_interval = sys.getswitchinterval()
596 self.addCleanup(sys.setswitchinterval, old_interval)
646 @unittest.skipIf(sys.platform in platforms_to_skip, "due to known OS bug")
651 import os, threading, sys
663 sys.stdout.flush()
842 old_trace = sys.gettrace()
843 sys.settrace(noop_trace)
858 sys.settrace(old_trace)
965 import sys
974 if 'threading' in sys.modules:
983 if 'threading' not in sys.modules:
997 import sys, os, time, threading
1005 sys.stdout.flush()
1025 @unittest.skipIf(sys.platform in platforms_to_skip, "due to known OS bug")
1035 sys.exit(0)
1046 @unittest.skipIf(sys.platform in platforms_to_skip, "due to known OS bug")
1060 sys.exit(0)
1074 @unittest.skipIf(sys.platform in platforms_to_skip, "due to known OS bug")
1082 import sys
1109 sys.exit(0)
1117 @unittest.skipIf(sys.platform in platforms_to_skip, "due to known OS bug")
1154 if len(sys._current_frames()) == 1:
1315 p = subprocess.Popen([sys.executable, "-c", script],
1351 import sys
1366 sys.stderr = None
1380 import sys
1391 sys.stderr = None
1471 args = threading.ExceptHookArgs([*sys.exc_info(), None])
1487 sys.exit(1)
1529 support.swap_attr(sys, 'excepthook', sys_hook), \
1548 print("Running a thread failed", file=sys.stderr)