Lines Matching defs:sys

15 import sys
24 MACOS = (sys.platform == 'darwin')
25 Py_DEBUG = hasattr(sys, 'gettotalrefcount')
43 STDLIB_INSTALL = os.path.join(sys.prefix, sys.platlibdir,
44 f'python{sys.version_info.major}.{sys.version_info.minor}')
66 builddir = os.path.dirname(sys.executable)
68 ext = ("_d" if debug_build(sys.executable) else "") + ".exe"
266 env = dict(os.environ, PYTHONPATH=os.pathsep.join(sys.path))
272 expected_output = f"sys.executable: {expected_path}\n"
278 Checks that sys.warnoptions and sys._xoptions can be set before the
282 env['PYTHONPATH'] = os.pathsep.join(sys.path)
286 "sys.warnoptions: ['once', 'module', 'default']\n"
287 "sys._xoptions: {'not_an_option': '1', 'also_not_an_option': '2'}\n"
316 self.assertEqual(out.rstrip(), "Py_Main() after Py_Initialize: sys.argv=['-c', 'arg2']")
321 self.assertEqual(out.rstrip(), "Py_RunMain(): sys.argv=['-c', 'arg2']")
329 self.assertEqual(out, "Py_RunMain(): sys.argv=['-c', 'arg2']\n" * nloop)
334 # sys attributes using struct types still work when
475 'platlibdir': sys.platlibdir,
593 import sys
600 sys.stdout.buffer.write(data)
601 sys.stdout.buffer.flush()
606 args = [sys.executable, '-S', '-c', code]
713 if debug_build(sys.executable):
1230 ver = sys.version_info
1232 os.path.join(prefix, sys.platlibdir,
1234 os.path.join(prefix, sys.platlibdir,
1236 os.path.join(exec_prefix, sys.platlibdir,
1290 version = f'{sys.version_info.major}.{sys.version_info.minor}'
1291 stdlib = os.path.join(home, sys.platlibdir, f'python{version}')
1331 version = f'{sys.version_info.major}.{sys.version_info.minor}'
1332 stdlib = os.path.join(home, sys.platlibdir, f'python{version}')
1355 exedir = os.path.dirname(sys.executable)
1361 prefix = exec_prefix = sys.prefix
1458 ver = sys.version_info
1462 sys.platlibdir,
1652 cmd = [sys.executable, '-X', 'utf8', '-I', '-m', 'test._test_embed_set_config']
1687 print("import sys", file=f)
1688 print("sys.__interactivehook__ = lambda: None", file=f)
1734 sys.argv ['./argv0', '-E', 'arg1', 'arg2']
1743 @unittest.skipUnless(hasattr(sys, 'gettotalrefcount'),
1755 cmd = [sys.executable, "-I", "-X", "showrefcount", "-X", xopt, "-c", stmt]