Lines Matching refs:config
634 config_check_consistency(const PyConfig *config)
636 /* Check config consistency */
637 assert(config->isolated >= 0);
638 assert(config->use_environment >= 0);
639 assert(config->dev_mode >= 0);
640 assert(config->install_signal_handlers >= 0);
641 assert(config->use_hash_seed >= 0);
642 assert(config->hash_seed <= MAX_HASH_SEED);
643 assert(config->faulthandler >= 0);
644 assert(config->tracemalloc >= 0);
645 assert(config->import_time >= 0);
646 assert(config->code_debug_ranges >= 0);
647 assert(config->show_ref_count >= 0);
648 assert(config->dump_refs >= 0);
649 assert(config->malloc_stats >= 0);
650 assert(config->site_import >= 0);
651 assert(config->bytes_warning >= 0);
652 assert(config->warn_default_encoding >= 0);
653 assert(config->inspect >= 0);
654 assert(config->interactive >= 0);
655 assert(config->optimization_level >= 0);
656 assert(config->parser_debug >= 0);
657 assert(config->write_bytecode >= 0);
658 assert(config->verbose >= 0);
659 assert(config->quiet >= 0);
660 assert(config->user_site_directory >= 0);
661 assert(config->parse_argv >= 0);
662 assert(config->configure_c_stdio >= 0);
663 assert(config->buffered_stdio >= 0);
664 assert(_PyWideStringList_CheckConsistency(&config->orig_argv));
665 assert(_PyWideStringList_CheckConsistency(&config->argv));
667 assert(config->argv.length >= 1);
668 assert(_PyWideStringList_CheckConsistency(&config->xoptions));
669 assert(_PyWideStringList_CheckConsistency(&config->warnoptions));
670 assert(_PyWideStringList_CheckConsistency(&config->module_search_paths));
671 assert(config->module_search_paths_set >= 0);
672 assert(config->filesystem_encoding != NULL);
673 assert(config->filesystem_errors != NULL);
674 assert(config->stdio_encoding != NULL);
675 assert(config->stdio_errors != NULL);
677 assert(config->legacy_windows_stdio >= 0);
680 assert(!(config->run_command != NULL && config->run_module != NULL));
681 assert(config->check_hash_pycs_mode != NULL);
682 assert(config->_install_importlib >= 0);
683 assert(config->pathconfig_warnings >= 0);
684 assert(config->_is_python_build >= 0);
685 assert(config->safe_path >= 0);
686 // config->use_frozen_modules is initialized later
693 /* Free memory allocated in config, but don't clear all attributes */
695 PyConfig_Clear(PyConfig *config)
703 CLEAR(config->pycache_prefix);
704 CLEAR(config->pythonpath_env);
705 CLEAR(config->home);
706 CLEAR(config->program_name);
708 _PyWideStringList_Clear(&config->argv);
709 _PyWideStringList_Clear(&config->warnoptions);
710 _PyWideStringList_Clear(&config->xoptions);
711 _PyWideStringList_Clear(&config->module_search_paths);
712 config->module_search_paths_set = 0;
713 CLEAR(config->stdlib_dir);
715 CLEAR(config->executable);
716 CLEAR(config->base_executable);
717 CLEAR(config->prefix);
718 CLEAR(config->base_prefix);
719 CLEAR(config->exec_prefix);
720 CLEAR(config->base_exec_prefix);
721 CLEAR(config->platlibdir);
723 CLEAR(config->filesystem_encoding);
724 CLEAR(config->filesystem_errors);
725 CLEAR(config->stdio_encoding);
726 CLEAR(config->stdio_errors);
727 CLEAR(config->run_command);
728 CLEAR(config->run_module);
729 CLEAR(config->run_filename);
730 CLEAR(config->check_hash_pycs_mode);
732 _PyWideStringList_Clear(&config->orig_argv);
738 _PyConfig_InitCompatConfig(PyConfig *config)
740 memset(config, 0, sizeof(*config));
742 config->_config_init = (int)_PyConfig_INIT_COMPAT;
743 config->isolated = -1;
744 config->use_environment = -1;
745 config->dev_mode = -1;
746 config->install_signal_handlers = 1;
747 config->use_hash_seed = -1;
748 config->faulthandler = -1;
749 config->tracemalloc = -1;
750 config->module_search_paths_set = 0;
751 config->parse_argv = 0;
752 config->site_import = -1;
753 config->bytes_warning = -1;
754 config->warn_default_encoding = 0;
755 config->inspect = -1;
756 config->interactive = -1;
757 config->optimization_level = -1;
758 config->parser_debug= -1;
759 config->write_bytecode = -1;
760 config->verbose = -1;
761 config->quiet = -1;
762 config->user_site_directory = -1;
763 config->configure_c_stdio = 0;
764 config->buffered_stdio = -1;
765 config->_install_importlib = 1;
766 config->check_hash_pycs_mode = NULL;
767 config->pathconfig_warnings = -1;
768 config->_init_main = 1;
769 config->_isolated_interpreter = 0;
771 config->legacy_windows_stdio = -1;
774 config->use_frozen_modules = 0;
776 config->use_frozen_modules = 1;
778 config->safe_path = 0;
779 config->_is_python_build = 0;
780 config->code_debug_ranges = 1;
789 config_init_defaults(PyConfig *config)
791 _PyConfig_InitCompatConfig(config);
793 config->isolated = 0;
794 config->use_environment = 1;
795 config->site_import = 1;
796 config->bytes_warning = 0;
797 config->inspect = 0;
798 config->interactive = 0;
799 config->optimization_level = 0;
800 config->parser_debug= 0;
801 config->write_bytecode = 1;
802 config->verbose = 0;
803 config->quiet = 0;
804 config->user_site_directory = 1;
805 config->buffered_stdio = 1;
806 config->pathconfig_warnings = 1;
808 config->legacy_windows_stdio = 0;
814 PyConfig_InitPythonConfig(PyConfig *config)
816 config_init_defaults(config);
818 config->_config_init = (int)_PyConfig_INIT_PYTHON;
819 config->configure_c_stdio = 1;
820 config->parse_argv = 1;
825 PyConfig_InitIsolatedConfig(PyConfig *config)
827 config_init_defaults(config);
829 config->_config_init = (int)_PyConfig_INIT_ISOLATED;
830 config->isolated = 1;
831 config->use_environment = 0;
832 config->user_site_directory = 0;
833 config->dev_mode = 0;
834 config->install_signal_handlers = 0;
835 config->use_hash_seed = 0;
836 config->faulthandler = 0;
837 config->tracemalloc = 0;
838 config->safe_path = 1;
839 config->pathconfig_warnings = 0;
841 config->legacy_windows_stdio = 0;
848 PyConfig_SetString(PyConfig *config, wchar_t **config_str, const wchar_t *str)
850 PyStatus status = _Py_PreInitializeFromConfig(config, NULL);
872 config_set_bytes_string(PyConfig *config, wchar_t **config_str,
875 PyStatus status = _Py_PreInitializeFromConfig(config, NULL);
902 #define CONFIG_SET_BYTES_STR(config, config_str, str, NAME) \
903 config_set_bytes_string(config, config_str, str, "cannot decode " NAME)
910 PyConfig_SetBytesString(PyConfig *config, wchar_t **config_str,
913 return CONFIG_SET_BYTES_STR(config, config_str, str, "string");
918 _PyConfig_Copy(PyConfig *config, const PyConfig *config2)
922 PyConfig_Clear(config);
924 #define COPY_ATTR(ATTR) config->ATTR = config2->ATTR
927 status = PyConfig_SetString(config, &config->ATTR, config2->ATTR); \
934 if (_PyWideStringList_Copy(&config->LIST, &config2->LIST) < 0) { \
1018 _PyConfig_AsDict(const PyConfig *config)
1038 SET_ITEM(#ATTR, PyLong_FromLong(config->ATTR))
1040 SET_ITEM(#ATTR, PyLong_FromUnsignedLong(config->ATTR))
1046 SET_ITEM(#ATTR, FROM_WSTRING(config->ATTR))
1048 SET_ITEM(#LIST, _PyWideStringList_AsList(&config->LIST))
1136 PyErr_Format(PyExc_ValueError, "missing config key: %s", name);
1146 PyErr_Format(PyExc_ValueError, "invalid config value: %s", name);
1153 PyErr_Format(PyExc_TypeError, "invalid config type: %s", name);
1202 config_dict_get_wstr(PyObject *dict, const char *name, PyConfig *config,
1211 status = PyConfig_SetString(config, result, NULL);
1222 status = PyConfig_SetString(config, result, wstr);
1234 config_dict_get_wstrlist(PyObject *dict, const char *name, PyConfig *config,
1285 _PyConfig_FromDict(PyConfig *config, PyObject *dict)
1299 if (config_dict_get_int(dict, #KEY, &config->KEY) < 0) { \
1302 CHECK_VALUE(#KEY, config->KEY >= 0); \
1306 if (config_dict_get_wstr(dict, #KEY, config, &config->KEY) < 0) { \
1309 CHECK_VALUE(#KEY, config->KEY != NULL); \
1313 if (config_dict_get_wstr(dict, #KEY, config, &config->KEY) < 0) { \
1319 if (config_dict_get_wstrlist(dict, #KEY, config, &config->KEY) < 0) { \
1326 config->_config_init == _PyConfig_INIT_COMPAT
1327 || config->_config_init == _PyConfig_INIT_PYTHON
1328 || config->_config_init == _PyConfig_INIT_ISOLATED);
1334 if (config_dict_get_ulong(dict, "hash_seed", &config->hash_seed) < 0) {
1337 CHECK_VALUE("hash_seed", config->hash_seed <= MAX_HASH_SEED);
1411 config_get_env(const PyConfig *config, const char *name)
1413 return _Py_GetEnv(config->use_environment, name);
1421 config_get_env_dup(PyConfig *config,
1427 assert(config->use_environment >= 0);
1429 if (!config->use_environment) {
1441 return PyConfig_SetString(config, dest, var);
1449 return config_set_bytes_string(config, dest, var, decode_err_msg);
1459 config_get_global_vars(PyConfig *config)
1461 if (config->_config_init != _PyConfig_INIT_COMPAT) {
1467 if (config->ATTR == -1) { \
1468 config->ATTR = VALUE; \
1471 if (config->ATTR == -1) { \
1472 config->ATTR = !(VALUE); \
1499 /* Set Py_xxx global configuration variables from 'config' configuration. */
1501 config_set_global_vars(const PyConfig *config)
1504 if (config->ATTR != -1) { \
1505 VAR = config->ATTR; \
1508 if (config->ATTR != -1) { \
1509 VAR = !config->ATTR; \
1532 Py_HashRandomizationFlag = (config->use_hash_seed == 0 ||
1533 config->hash_seed != 0);
1541 config_get_xoption(const PyConfig *config, wchar_t *name)
1543 return _Py_get_xoption(&config->xoptions, name);
1547 config_get_xoption_value(const PyConfig *config, wchar_t *name)
1549 const wchar_t *xoption = config_get_xoption(config, name);
1559 config_init_hash_seed(PyConfig *config)
1564 const char *seed_text = config_get_env(config, "PYTHONHASHSEED");
1580 config->use_hash_seed = 1;
1581 config->hash_seed = seed;
1585 config->use_hash_seed = 0;
1586 config->hash_seed = 0;
1611 config_read_env_vars(PyConfig *config)
1614 int use_env = config->use_environment;
1617 _Py_get_env_flag(use_env, &config->parser_debug, "PYTHONDEBUG");
1618 _Py_get_env_flag(use_env, &config->verbose, "PYTHONVERBOSE");
1619 _Py_get_env_flag(use_env, &config->optimization_level, "PYTHONOPTIMIZE");
1620 _Py_get_env_flag(use_env, &config->inspect, "PYTHONINSPECT");
1625 config->write_bytecode = 0;
1631 config->user_site_directory = 0;
1637 config->buffered_stdio = 0;
1641 _Py_get_env_flag(use_env, &config->legacy_windows_stdio,
1645 if (config_get_env(config, "PYTHONDUMPREFS")) {
1646 config->dump_refs = 1;
1648 if (config_get_env(config, "PYTHONMALLOCSTATS")) {
1649 config->malloc_stats = 1;
1652 if (config->dump_refs_file == NULL) {
1653 status = CONFIG_GET_ENV_DUP(config, &config->dump_refs_file,
1660 if (config->pythonpath_env == NULL) {
1661 status = CONFIG_GET_ENV_DUP(config, &config->pythonpath_env,
1668 if(config->platlibdir == NULL) {
1669 status = CONFIG_GET_ENV_DUP(config, &config->platlibdir,
1676 if (config->use_hash_seed < 0) {
1677 status = config_init_hash_seed(config);
1683 if (config_get_env(config, "PYTHONSAFEPATH")) {
1684 config->safe_path = 1;
1692 config_init_tracemalloc(PyConfig *config)
1697 const char *env = config_get_env(config, "PYTHONTRACEMALLOC");
1708 config->tracemalloc = nframe;
1711 const wchar_t *xoption = config_get_xoption(config, L"tracemalloc");
1730 config->tracemalloc = nframe;
1736 config_init_int_max_str_digits(PyConfig *config)
1740 const char *env = config_get_env(config, "PYTHONINTMAXSTRDIGITS");
1757 const wchar_t *xoption = config_get_xoption(config, L"int_max_str_digits");
1780 config_init_pycache_prefix(PyConfig *config)
1782 assert(config->pycache_prefix == NULL);
1784 const wchar_t *xoption = config_get_xoption(config, L"pycache_prefix");
1788 config->pycache_prefix = _PyMem_RawWcsdup(sep + 1);
1789 if (config->pycache_prefix == NULL) {
1796 config->pycache_prefix = NULL;
1801 return CONFIG_GET_ENV_DUP(config, &config->pycache_prefix,
1808 config_read_complex_options(PyConfig *config)
1811 if (config->faulthandler < 0) {
1812 if (config_get_env(config, "PYTHONFAULTHANDLER")
1813 || config_get_xoption(config, L"faulthandler")) {
1814 config->faulthandler = 1;
1817 if (config_get_env(config, "PYTHONPROFILEIMPORTTIME")
1818 || config_get_xoption(config, L"importtime")) {
1819 config->import_time = 1;
1822 if (config_get_env(config, "PYTHONNODEBUGRANGES")
1823 || config_get_xoption(config, L"no_debug_ranges")) {
1824 config->code_debug_ranges = 0;
1828 if (config->tracemalloc < 0) {
1829 status = config_init_tracemalloc(config);
1835 status = config_init_int_max_str_digits(config);
1841 if (config->pycache_prefix == NULL) {
1842 status = config_init_pycache_prefix(config);
1885 config_get_locale_encoding(PyConfig *config, const PyPreConfig *preconfig,
1898 PyStatus status = PyConfig_SetString(config, locale_encoding, encoding);
1905 config_init_stdio_encoding(PyConfig *config,
1912 if (config->stdio_encoding == NULL && _Py_StandardStreamEncoding != NULL) {
1913 status = CONFIG_SET_BYTES_STR(config, &config->stdio_encoding,
1921 if (config->stdio_errors == NULL && _Py_StandardStreamErrors != NULL) {
1922 status = CONFIG_SET_BYTES_STR(config, &config->stdio_errors,
1931 if (config->stdio_encoding != NULL && config->stdio_errors != NULL) {
1936 const char *opt = config_get_env(config, "PYTHONIOENCODING");
1954 if (config->stdio_encoding == NULL) {
1955 status = CONFIG_SET_BYTES_STR(config, &config->stdio_encoding,
1973 if (config->stdio_errors == NULL && errors != NULL) {
1974 status = CONFIG_SET_BYTES_STR(config, &config->stdio_errors,
1987 if (config->stdio_encoding == NULL) {
1988 status = config_get_locale_encoding(config, preconfig,
1989 &config->stdio_encoding);
1994 if (config->stdio_errors == NULL) {
1998 status = PyConfig_SetString(config, &config->stdio_errors, errors);
2010 config_get_fs_encoding(PyConfig *config, const PyPreConfig *preconfig,
2014 return PyConfig_SetString(config, fs_encoding, L"utf-8");
2025 return PyConfig_SetString(config, fs_encoding, encoding);
2028 return PyConfig_SetString(config, fs_encoding, L"utf-8");
2032 return PyConfig_SetString(config, fs_encoding, L"ascii");
2035 return config_get_locale_encoding(config, preconfig, fs_encoding);
2041 config_init_fs_encoding(PyConfig *config, const PyPreConfig *preconfig)
2045 if (config->filesystem_encoding == NULL) {
2046 status = config_get_fs_encoding(config, preconfig,
2047 &config->filesystem_encoding);
2053 if (config->filesystem_errors == NULL) {
2065 status = PyConfig_SetString(config, &config->filesystem_errors, errors);
2075 config_init_import(PyConfig *config, int compute_path_config)
2079 status = _PyConfig_InitPathConfig(config, compute_path_config);
2085 const wchar_t *value = config_get_xoption_value(config, L"frozen_modules");
2089 config->use_frozen_modules = 1;
2092 config->use_frozen_modules = 0;
2096 config->use_frozen_modules = 1;
2103 assert(config->use_frozen_modules >= 0);
2108 _PyConfig_InitImportConfig(PyConfig *config)
2110 return config_init_import(config, 1);
2115 config_read(PyConfig *config, int compute_path_config)
2120 if (config->use_environment) {
2121 status = config_read_env_vars(config);
2128 if (config_get_xoption(config, L"showrefcount")) {
2129 config->show_ref_count = 1;
2132 status = config_read_complex_options(config);
2137 if (config->_install_importlib) {
2138 status = config_init_import(config, compute_path_config);
2145 if (config->dev_mode) {
2146 if (config->faulthandler < 0) {
2147 config->faulthandler = 1;
2150 if (config->faulthandler < 0) {
2151 config->faulthandler = 0;
2153 if (config->tracemalloc < 0) {
2154 config->tracemalloc = 0;
2156 if (config->use_hash_seed < 0) {
2157 config->use_hash_seed = 0;
2158 config->hash_seed = 0;
2161 if (config->filesystem_encoding == NULL || config->filesystem_errors == NULL) {
2162 status = config_init_fs_encoding(config, preconfig);
2168 status = config_init_stdio_encoding(config, preconfig);
2173 if (config->argv.length < 1) {
2175 status = PyWideStringList_Append(&config->argv, L"");
2181 if (config->check_hash_pycs_mode == NULL) {
2182 status = PyConfig_SetString(config, &config->check_hash_pycs_mode,
2189 if (config->configure_c_stdio < 0) {
2190 config->configure_c_stdio = 1;
2194 if (config->parse_argv == 1) {
2195 config->parse_argv = 2;
2203 config_init_stdio(const PyConfig *config)
2212 if (!config->buffered_stdio) {
2223 else if (config->interactive) {
2244 _PyConfig_Write(const PyConfig *config, _PyRuntimeState *runtime)
2246 config_set_global_vars(config);
2248 if (config->configure_c_stdio) {
2249 config_init_stdio(config);
2254 preconfig->isolated = config->isolated;
2255 preconfig->use_environment = config->use_environment;
2256 preconfig->dev_mode = config->dev_mode;
2258 if (_Py_SetArgcArgv(config->orig_argv.length,
2259 config->orig_argv.items) < 0)
2307 config_parse_cmdline(PyConfig *config, PyWideStringList *warnoptions,
2311 const PyWideStringList *argv = &config->argv;
2313 const wchar_t* program = config->program_name;
2327 if (config->run_command == NULL) {
2339 config->run_command = command;
2348 if (config->run_module == NULL) {
2349 config->run_module = _PyMem_RawWcsdup(_PyOS_optarg);
2350 if (config->run_module == NULL) {
2365 status = PyConfig_SetString(config, &config->check_hash_pycs_mode,
2394 config->bytes_warning++;
2398 config->parser_debug++;
2402 config->inspect++;
2403 config->interactive++;
2415 config->optimization_level++;
2419 config->safe_path = 1;
2423 config->write_bytecode = 0;
2427 config->user_site_directory = 0;
2431 config->site_import = 0;
2439 config->buffered_stdio = 0;
2443 config->verbose++;
2447 config->skip_source_first_line = 1;
2467 config->quiet++;
2471 config->use_hash_seed = 0;
2489 if (config->run_command == NULL && config->run_module == NULL
2492 && config->run_filename == NULL)
2494 config->run_filename = _PyMem_RawWcsdup(argv->items[_PyOS_optind]);
2495 if (config->run_filename == NULL) {
2500 if (config->run_command != NULL || config->run_module != NULL) {
2519 config_init_env_warnoptions(PyConfig *config, PyWideStringList *warnoptions)
2524 status = CONFIG_GET_ENV_DUP(config, &env,
2553 warnoptions_append(PyConfig *config, PyWideStringList *options,
2556 /* config_init_warnoptions() add existing config warnoptions at the end:
2560 if (_PyWideStringList_Find(&config->warnoptions, option)) {
2573 warnoptions_extend(PyConfig *config, PyWideStringList *options,
2580 PyStatus status = warnoptions_append(config, options, items[i]);
2590 config_init_warnoptions(PyConfig *config,
2615 if (config->dev_mode) {
2616 status = warnoptions_append(config, &options, L"default");
2622 status = warnoptions_extend(config, &options, env_warnoptions);
2627 status = warnoptions_extend(config, &options, cmdline_warnoptions);
2636 if (config->bytes_warning) {
2638 if (config->bytes_warning> 1) {
2644 status = warnoptions_append(config, &options, filter);
2650 status = warnoptions_extend(config, &options, sys_warnoptions);
2656 status = _PyWideStringList_Extend(&options, &config->warnoptions);
2661 _PyWideStringList_Clear(&config->warnoptions);
2662 config->warnoptions = options;
2672 config_update_argv(PyConfig *config, Py_ssize_t opt_index)
2674 const PyWideStringList *cmdline_argv = &config->argv;
2696 if (config->run_command != NULL) {
2700 else if (config->run_module != NULL) {
2716 _PyWideStringList_Clear(&config->argv);
2717 config->argv = config_argv;
2723 core_read_precmdline(PyConfig *config, _PyPreCmdline *precmdline)
2727 if (config->parse_argv == 1) {
2728 if (_PyWideStringList_Copy(&precmdline->argv, &config->argv) < 0) {
2740 _PyPreConfig_GetConfig(&preconfig, config);
2747 status = _PyPreCmdline_SetConfig(precmdline, config);
2757 config_run_filename_abspath(PyConfig *config)
2759 if (!config->run_filename) {
2764 if (_Py_isabs(config->run_filename)) {
2771 if (_Py_abspath(config->run_filename, &abs_filename) < 0) {
2780 PyMem_RawFree(config->run_filename);
2781 config->run_filename = abs_filename;
2787 config_read_cmdline(PyConfig *config)
2794 if (config->parse_argv < 0) {
2795 config->parse_argv = 1;
2798 if (config->parse_argv == 1) {
2800 status = config_parse_cmdline(config, &cmdline_warnoptions, &opt_index);
2805 status = config_run_filename_abspath(config);
2810 status = config_update_argv(config, opt_index);
2816 status = config_run_filename_abspath(config);
2822 if (config->use_environment) {
2823 status = config_init_env_warnoptions(config, &env_warnoptions);
2835 status = config_init_warnoptions(config,
2854 _PyConfig_SetPyArgv(PyConfig *config, const _PyArgv *args)
2856 PyStatus status = _Py_PreInitializeFromConfig(config, args);
2861 return _PyArgv_AsWstrList(args, &config->argv);
2865 /* Set config.argv: decode argv using Py_DecodeLocale(). Pre-initialize Python
2868 PyConfig_SetBytesArgv(PyConfig *config, Py_ssize_t argc, char * const *argv)
2875 return _PyConfig_SetPyArgv(config, &args);
2880 PyConfig_SetArgv(PyConfig *config, Py_ssize_t argc, wchar_t * const *argv)
2887 return _PyConfig_SetPyArgv(config, &args);
2892 PyConfig_SetWideStringList(PyConfig *config, PyWideStringList *list,
2895 PyStatus status = _Py_PreInitializeFromConfig(config, NULL);
2914 The only side effects are to modify config and to call _Py_SetArgcArgv(). */
2916 _PyConfig_Read(PyConfig *config, int compute_path_config)
2920 status = _Py_PreInitializeFromConfig(config, NULL);
2925 config_get_global_vars(config);
2927 if (config->orig_argv.length == 0
2928 && !(config->argv.length == 1
2929 && wcscmp(config->argv.items[0], L"") == 0))
2931 if (_PyWideStringList_Copy(&config->orig_argv, &config->argv) < 0) {
2937 status = core_read_precmdline(config, &precmdline);
2942 assert(config->isolated >= 0);
2943 if (config->isolated) {
2944 config->safe_path = 1;
2945 config->use_environment = 0;
2946 config->user_site_directory = 0;
2949 status = config_read_cmdline(config);
2955 status = _PySys_ReadPreinitXOptions(config);
2960 status = config_read(config, compute_path_config);
2965 assert(config_check_consistency(config));
2976 PyConfig_Read(PyConfig *config)
2978 return _PyConfig_Read(config, 0);
3003 /* pre config */
3015 /* core config */
3016 const PyConfig *config = _PyInterpreterState_GetConfig(interp);
3017 dict = _PyConfig_AsDict(config);
3021 if (PyDict_SetItemString(result, "config", dict) < 0) {
3079 init_dump_ascii_wstr(config->FIELD); \
3083 const PyConfig *config = _PyInterpreterState_GetConfig(tstate->interp);
3087 PySys_WriteStderr(" isolated = %i\n", config->isolated);
3088 PySys_WriteStderr(" environment = %i\n", config->use_environment);
3089 PySys_WriteStderr(" user site = %i\n", config->user_site_directory);
3090 PySys_WriteStderr(" safe_path = %i\n", config->safe_path);
3091 PySys_WriteStderr(" import site = %i\n", config->site_import);
3092 PySys_WriteStderr(" is in build tree = %i\n", config->_is_python_build);