Lines Matching refs:sys
163 import sys
184 for module in sys.modules.itervalues():
197 if sys.platform == 'darwin':
210 if sys.platform == 'win32':
236 sys.exit(code)
268 test_support.record_original_stdout(sys.stdout)
270 opts, args = getopt.getopt(sys.argv[1:], 'hvqxsSrf:lu:t:TD:NLR:FwWM:j:P',
369 sys.exit(0)
373 print >>sys.stderr, ("No handler for option {}. Please "
375 sys.exit(1)
440 " ".join(sys.version.split())
442 "%s-endian" % sys.byteorder
444 print "Testing with flags:", sys.flags
460 tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix],
465 save_modules = set(sys.modules)
502 sys.exit(2)
517 base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest']
562 print >>sys.stderr, stderr
563 sys.stdout.flush()
564 sys.stderr.flush()
586 sys.stdout.flush()
615 for module in sys.modules.keys():
647 plat = sys.platform
664 sys.stdout.flush()
694 sys.exit(len(bad) > 0 or interrupted)
804 return id(sys.argv), sys.argv, sys.argv[:]
806 sys.argv = saved_argv[1]
807 sys.argv[:] = saved_argv[2]
815 return sys.stdout
817 sys.stdout = saved_stdout
820 return sys.stderr
822 sys.stderr = saved_stderr
825 return sys.stdin
827 sys.stdin = saved_stdin
837 return id(sys.path), sys.path, sys.path[:]
839 sys.path = saved_path[1]
840 sys.path[:] = saved_path[2]
843 asyncore = sys.modules.get('asyncore')
847 asyncore = sys.modules.get('asyncore')
901 print >>sys.stderr, (
905 print >>sys.stderr, (
925 save_stdout = sys.stdout
928 sys.stdout = capture_stdout
950 sys.stdout = save_stdout
954 sys.stdout.flush()
959 sys.stdout.flush()
965 print >>sys.stderr, "test", test, "failed --", msg
966 sys.stderr.flush()
969 type, value = sys.exc_info()[:2]
971 print >>sys.stderr, "test", test, "crashed --", str(type) + ":", value
972 sys.stderr.flush()
974 traceback.print_exc(file=sys.stderr)
975 sys.stderr.flush()
992 sys.stdout.flush()
1031 print >> sys.stderr, ("%r left behind %s %r and it couldn't be "
1043 if not hasattr(sys, 'gettotalrefcount'):
1050 pic = sys.path_importer_cache.copy()
1077 print >> sys.stderr, "beginning", repcount, "repetitions"
1078 print >> sys.stderr, ("1234567890"*(repcount//10 + 1))[:repcount]
1081 rc_before = sys.gettotalrefcount()
1083 sys.stderr.write('.')
1085 rc_after = sys.gettotalrefcount()
1088 print >> sys.stderr
1091 print >> sys.stderr, msg
1105 sys.path_importer_cache.clear()
1106 sys.path_importer_cache.update(pic)
1116 sys._clear_type_cache()
1130 for mod in sys.modules.values():
1137 distutils_dir_util = sys.modules['distutils.dir_util']
1146 _strptime = sys.modules['_strptime']
1153 urlparse = sys.modules['urlparse']
1160 urllib = sys.modules['urllib']
1167 urllib2 = sys.modules['urllib2']
1174 dircache = sys.modules['dircache']
1181 linecache = sys.modules['linecache']
1188 mimetypes = sys.modules['mimetypes']
1195 filecmp = sys.modules['filecmp']
1202 struct = sys.modules['struct']
1209 doctest = sys.modules['doctest']
1216 ctypes = sys.modules['ctypes']
1585 if sys.platform in _expectations:
1586 s = _expectations[sys.platform]
1598 if sys.maxint == 9223372036854775807L:
1601 if sys.platform != "darwin":
1611 if sys.platform != "win32":
1620 if sys.platform != 'irix':
1626 if sys.platform != 'sunos5':
1630 if not sys.py3kwarning:
1656 assert __file__ == os.path.abspath(sys.argv[0])