jpayne@69
|
1 #ifndef Py_PYCORECONFIG_H
|
jpayne@69
|
2 #define Py_PYCORECONFIG_H
|
jpayne@69
|
3 #ifndef Py_LIMITED_API
|
jpayne@69
|
4 #ifdef __cplusplus
|
jpayne@69
|
5 extern "C" {
|
jpayne@69
|
6 #endif
|
jpayne@69
|
7
|
jpayne@69
|
8 /* --- PyStatus ----------------------------------------------- */
|
jpayne@69
|
9
|
jpayne@69
|
10 typedef struct {
|
jpayne@69
|
11 enum {
|
jpayne@69
|
12 _PyStatus_TYPE_OK=0,
|
jpayne@69
|
13 _PyStatus_TYPE_ERROR=1,
|
jpayne@69
|
14 _PyStatus_TYPE_EXIT=2
|
jpayne@69
|
15 } _type;
|
jpayne@69
|
16 const char *func;
|
jpayne@69
|
17 const char *err_msg;
|
jpayne@69
|
18 int exitcode;
|
jpayne@69
|
19 } PyStatus;
|
jpayne@69
|
20
|
jpayne@69
|
21 PyAPI_FUNC(PyStatus) PyStatus_Ok(void);
|
jpayne@69
|
22 PyAPI_FUNC(PyStatus) PyStatus_Error(const char *err_msg);
|
jpayne@69
|
23 PyAPI_FUNC(PyStatus) PyStatus_NoMemory(void);
|
jpayne@69
|
24 PyAPI_FUNC(PyStatus) PyStatus_Exit(int exitcode);
|
jpayne@69
|
25 PyAPI_FUNC(int) PyStatus_IsError(PyStatus err);
|
jpayne@69
|
26 PyAPI_FUNC(int) PyStatus_IsExit(PyStatus err);
|
jpayne@69
|
27 PyAPI_FUNC(int) PyStatus_Exception(PyStatus err);
|
jpayne@69
|
28
|
jpayne@69
|
29 /* --- PyWideStringList ------------------------------------------------ */
|
jpayne@69
|
30
|
jpayne@69
|
31 typedef struct {
|
jpayne@69
|
32 /* If length is greater than zero, items must be non-NULL
|
jpayne@69
|
33 and all items strings must be non-NULL */
|
jpayne@69
|
34 Py_ssize_t length;
|
jpayne@69
|
35 wchar_t **items;
|
jpayne@69
|
36 } PyWideStringList;
|
jpayne@69
|
37
|
jpayne@69
|
38 PyAPI_FUNC(PyStatus) PyWideStringList_Append(PyWideStringList *list,
|
jpayne@69
|
39 const wchar_t *item);
|
jpayne@69
|
40 PyAPI_FUNC(PyStatus) PyWideStringList_Insert(PyWideStringList *list,
|
jpayne@69
|
41 Py_ssize_t index,
|
jpayne@69
|
42 const wchar_t *item);
|
jpayne@69
|
43
|
jpayne@69
|
44
|
jpayne@69
|
45 /* --- PyPreConfig ----------------------------------------------- */
|
jpayne@69
|
46
|
jpayne@69
|
47 typedef struct {
|
jpayne@69
|
48 int _config_init; /* _PyConfigInitEnum value */
|
jpayne@69
|
49
|
jpayne@69
|
50 /* Parse Py_PreInitializeFromBytesArgs() arguments?
|
jpayne@69
|
51 See PyConfig.parse_argv */
|
jpayne@69
|
52 int parse_argv;
|
jpayne@69
|
53
|
jpayne@69
|
54 /* If greater than 0, enable isolated mode: sys.path contains
|
jpayne@69
|
55 neither the script's directory nor the user's site-packages directory.
|
jpayne@69
|
56
|
jpayne@69
|
57 Set to 1 by the -I command line option. If set to -1 (default), inherit
|
jpayne@69
|
58 Py_IsolatedFlag value. */
|
jpayne@69
|
59 int isolated;
|
jpayne@69
|
60
|
jpayne@69
|
61 /* If greater than 0: use environment variables.
|
jpayne@69
|
62 Set to 0 by -E command line option. If set to -1 (default), it is
|
jpayne@69
|
63 set to !Py_IgnoreEnvironmentFlag. */
|
jpayne@69
|
64 int use_environment;
|
jpayne@69
|
65
|
jpayne@69
|
66 /* Set the LC_CTYPE locale to the user preferred locale? If equals to 0,
|
jpayne@69
|
67 set coerce_c_locale and coerce_c_locale_warn to 0. */
|
jpayne@69
|
68 int configure_locale;
|
jpayne@69
|
69
|
jpayne@69
|
70 /* Coerce the LC_CTYPE locale if it's equal to "C"? (PEP 538)
|
jpayne@69
|
71
|
jpayne@69
|
72 Set to 0 by PYTHONCOERCECLOCALE=0. Set to 1 by PYTHONCOERCECLOCALE=1.
|
jpayne@69
|
73 Set to 2 if the user preferred LC_CTYPE locale is "C".
|
jpayne@69
|
74
|
jpayne@69
|
75 If it is equal to 1, LC_CTYPE locale is read to decide if it should be
|
jpayne@69
|
76 coerced or not (ex: PYTHONCOERCECLOCALE=1). Internally, it is set to 2
|
jpayne@69
|
77 if the LC_CTYPE locale must be coerced.
|
jpayne@69
|
78
|
jpayne@69
|
79 Disable by default (set to 0). Set it to -1 to let Python decide if it
|
jpayne@69
|
80 should be enabled or not. */
|
jpayne@69
|
81 int coerce_c_locale;
|
jpayne@69
|
82
|
jpayne@69
|
83 /* Emit a warning if the LC_CTYPE locale is coerced?
|
jpayne@69
|
84
|
jpayne@69
|
85 Set to 1 by PYTHONCOERCECLOCALE=warn.
|
jpayne@69
|
86
|
jpayne@69
|
87 Disable by default (set to 0). Set it to -1 to let Python decide if it
|
jpayne@69
|
88 should be enabled or not. */
|
jpayne@69
|
89 int coerce_c_locale_warn;
|
jpayne@69
|
90
|
jpayne@69
|
91 #ifdef MS_WINDOWS
|
jpayne@69
|
92 /* If greater than 1, use the "mbcs" encoding instead of the UTF-8
|
jpayne@69
|
93 encoding for the filesystem encoding.
|
jpayne@69
|
94
|
jpayne@69
|
95 Set to 1 if the PYTHONLEGACYWINDOWSFSENCODING environment variable is
|
jpayne@69
|
96 set to a non-empty string. If set to -1 (default), inherit
|
jpayne@69
|
97 Py_LegacyWindowsFSEncodingFlag value.
|
jpayne@69
|
98
|
jpayne@69
|
99 See PEP 529 for more details. */
|
jpayne@69
|
100 int legacy_windows_fs_encoding;
|
jpayne@69
|
101 #endif
|
jpayne@69
|
102
|
jpayne@69
|
103 /* Enable UTF-8 mode? (PEP 540)
|
jpayne@69
|
104
|
jpayne@69
|
105 Disabled by default (equals to 0).
|
jpayne@69
|
106
|
jpayne@69
|
107 Set to 1 by "-X utf8" and "-X utf8=1" command line options.
|
jpayne@69
|
108 Set to 1 by PYTHONUTF8=1 environment variable.
|
jpayne@69
|
109
|
jpayne@69
|
110 Set to 0 by "-X utf8=0" and PYTHONUTF8=0.
|
jpayne@69
|
111
|
jpayne@69
|
112 If equals to -1, it is set to 1 if the LC_CTYPE locale is "C" or
|
jpayne@69
|
113 "POSIX", otherwise it is set to 0. Inherit Py_UTF8Mode value value. */
|
jpayne@69
|
114 int utf8_mode;
|
jpayne@69
|
115
|
jpayne@69
|
116 int dev_mode; /* Development mode. PYTHONDEVMODE, -X dev */
|
jpayne@69
|
117
|
jpayne@69
|
118 /* Memory allocator: PYTHONMALLOC env var.
|
jpayne@69
|
119 See PyMemAllocatorName for valid values. */
|
jpayne@69
|
120 int allocator;
|
jpayne@69
|
121 } PyPreConfig;
|
jpayne@69
|
122
|
jpayne@69
|
123 PyAPI_FUNC(void) PyPreConfig_InitPythonConfig(PyPreConfig *config);
|
jpayne@69
|
124 PyAPI_FUNC(void) PyPreConfig_InitIsolatedConfig(PyPreConfig *config);
|
jpayne@69
|
125
|
jpayne@69
|
126
|
jpayne@69
|
127 /* --- PyConfig ---------------------------------------------- */
|
jpayne@69
|
128
|
jpayne@69
|
129 typedef struct {
|
jpayne@69
|
130 int _config_init; /* _PyConfigInitEnum value */
|
jpayne@69
|
131
|
jpayne@69
|
132 int isolated; /* Isolated mode? see PyPreConfig.isolated */
|
jpayne@69
|
133 int use_environment; /* Use environment variables? see PyPreConfig.use_environment */
|
jpayne@69
|
134 int dev_mode; /* Development mode? See PyPreConfig.dev_mode */
|
jpayne@69
|
135
|
jpayne@69
|
136 /* Install signal handlers? Yes by default. */
|
jpayne@69
|
137 int install_signal_handlers;
|
jpayne@69
|
138
|
jpayne@69
|
139 int use_hash_seed; /* PYTHONHASHSEED=x */
|
jpayne@69
|
140 unsigned long hash_seed;
|
jpayne@69
|
141
|
jpayne@69
|
142 /* Enable faulthandler?
|
jpayne@69
|
143 Set to 1 by -X faulthandler and PYTHONFAULTHANDLER. -1 means unset. */
|
jpayne@69
|
144 int faulthandler;
|
jpayne@69
|
145
|
jpayne@69
|
146 /* Enable tracemalloc?
|
jpayne@69
|
147 Set by -X tracemalloc=N and PYTHONTRACEMALLOC. -1 means unset */
|
jpayne@69
|
148 int tracemalloc;
|
jpayne@69
|
149
|
jpayne@69
|
150 int import_time; /* PYTHONPROFILEIMPORTTIME, -X importtime */
|
jpayne@69
|
151 int show_ref_count; /* -X showrefcount */
|
jpayne@69
|
152 int show_alloc_count; /* -X showalloccount */
|
jpayne@69
|
153 int dump_refs; /* PYTHONDUMPREFS */
|
jpayne@69
|
154 int malloc_stats; /* PYTHONMALLOCSTATS */
|
jpayne@69
|
155
|
jpayne@69
|
156 /* Python filesystem encoding and error handler:
|
jpayne@69
|
157 sys.getfilesystemencoding() and sys.getfilesystemencodeerrors().
|
jpayne@69
|
158
|
jpayne@69
|
159 Default encoding and error handler:
|
jpayne@69
|
160
|
jpayne@69
|
161 * if Py_SetStandardStreamEncoding() has been called: they have the
|
jpayne@69
|
162 highest priority;
|
jpayne@69
|
163 * PYTHONIOENCODING environment variable;
|
jpayne@69
|
164 * The UTF-8 Mode uses UTF-8/surrogateescape;
|
jpayne@69
|
165 * If Python forces the usage of the ASCII encoding (ex: C locale
|
jpayne@69
|
166 or POSIX locale on FreeBSD or HP-UX), use ASCII/surrogateescape;
|
jpayne@69
|
167 * locale encoding: ANSI code page on Windows, UTF-8 on Android and
|
jpayne@69
|
168 VxWorks, LC_CTYPE locale encoding on other platforms;
|
jpayne@69
|
169 * On Windows, "surrogateescape" error handler;
|
jpayne@69
|
170 * "surrogateescape" error handler if the LC_CTYPE locale is "C" or "POSIX";
|
jpayne@69
|
171 * "surrogateescape" error handler if the LC_CTYPE locale has been coerced
|
jpayne@69
|
172 (PEP 538);
|
jpayne@69
|
173 * "strict" error handler.
|
jpayne@69
|
174
|
jpayne@69
|
175 Supported error handlers: "strict", "surrogateescape" and
|
jpayne@69
|
176 "surrogatepass". The surrogatepass error handler is only supported
|
jpayne@69
|
177 if Py_DecodeLocale() and Py_EncodeLocale() use directly the UTF-8 codec;
|
jpayne@69
|
178 it's only used on Windows.
|
jpayne@69
|
179
|
jpayne@69
|
180 initfsencoding() updates the encoding to the Python codec name.
|
jpayne@69
|
181 For example, "ANSI_X3.4-1968" is replaced with "ascii".
|
jpayne@69
|
182
|
jpayne@69
|
183 On Windows, sys._enablelegacywindowsfsencoding() sets the
|
jpayne@69
|
184 encoding/errors to mbcs/replace at runtime.
|
jpayne@69
|
185
|
jpayne@69
|
186
|
jpayne@69
|
187 See Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors.
|
jpayne@69
|
188 */
|
jpayne@69
|
189 wchar_t *filesystem_encoding;
|
jpayne@69
|
190 wchar_t *filesystem_errors;
|
jpayne@69
|
191
|
jpayne@69
|
192 wchar_t *pycache_prefix; /* PYTHONPYCACHEPREFIX, -X pycache_prefix=PATH */
|
jpayne@69
|
193 int parse_argv; /* Parse argv command line arguments? */
|
jpayne@69
|
194
|
jpayne@69
|
195 /* Command line arguments (sys.argv).
|
jpayne@69
|
196
|
jpayne@69
|
197 Set parse_argv to 1 to parse argv as Python command line arguments
|
jpayne@69
|
198 and then strip Python arguments from argv.
|
jpayne@69
|
199
|
jpayne@69
|
200 If argv is empty, an empty string is added to ensure that sys.argv
|
jpayne@69
|
201 always exists and is never empty. */
|
jpayne@69
|
202 PyWideStringList argv;
|
jpayne@69
|
203
|
jpayne@69
|
204 /* Program name:
|
jpayne@69
|
205
|
jpayne@69
|
206 - If Py_SetProgramName() was called, use its value.
|
jpayne@69
|
207 - On macOS, use PYTHONEXECUTABLE environment variable if set.
|
jpayne@69
|
208 - If WITH_NEXT_FRAMEWORK macro is defined, use __PYVENV_LAUNCHER__
|
jpayne@69
|
209 environment variable is set.
|
jpayne@69
|
210 - Use argv[0] if available and non-empty.
|
jpayne@69
|
211 - Use "python" on Windows, or "python3 on other platforms. */
|
jpayne@69
|
212 wchar_t *program_name;
|
jpayne@69
|
213
|
jpayne@69
|
214 PyWideStringList xoptions; /* Command line -X options */
|
jpayne@69
|
215
|
jpayne@69
|
216 /* Warnings options: lowest to highest priority. warnings.filters
|
jpayne@69
|
217 is built in the reverse order (highest to lowest priority). */
|
jpayne@69
|
218 PyWideStringList warnoptions;
|
jpayne@69
|
219
|
jpayne@69
|
220 /* If equal to zero, disable the import of the module site and the
|
jpayne@69
|
221 site-dependent manipulations of sys.path that it entails. Also disable
|
jpayne@69
|
222 these manipulations if site is explicitly imported later (call
|
jpayne@69
|
223 site.main() if you want them to be triggered).
|
jpayne@69
|
224
|
jpayne@69
|
225 Set to 0 by the -S command line option. If set to -1 (default), it is
|
jpayne@69
|
226 set to !Py_NoSiteFlag. */
|
jpayne@69
|
227 int site_import;
|
jpayne@69
|
228
|
jpayne@69
|
229 /* Bytes warnings:
|
jpayne@69
|
230
|
jpayne@69
|
231 * If equal to 1, issue a warning when comparing bytes or bytearray with
|
jpayne@69
|
232 str or bytes with int.
|
jpayne@69
|
233 * If equal or greater to 2, issue an error.
|
jpayne@69
|
234
|
jpayne@69
|
235 Incremented by the -b command line option. If set to -1 (default), inherit
|
jpayne@69
|
236 Py_BytesWarningFlag value. */
|
jpayne@69
|
237 int bytes_warning;
|
jpayne@69
|
238
|
jpayne@69
|
239 /* If greater than 0, enable inspect: when a script is passed as first
|
jpayne@69
|
240 argument or the -c option is used, enter interactive mode after
|
jpayne@69
|
241 executing the script or the command, even when sys.stdin does not appear
|
jpayne@69
|
242 to be a terminal.
|
jpayne@69
|
243
|
jpayne@69
|
244 Incremented by the -i command line option. Set to 1 if the PYTHONINSPECT
|
jpayne@69
|
245 environment variable is non-empty. If set to -1 (default), inherit
|
jpayne@69
|
246 Py_InspectFlag value. */
|
jpayne@69
|
247 int inspect;
|
jpayne@69
|
248
|
jpayne@69
|
249 /* If greater than 0: enable the interactive mode (REPL).
|
jpayne@69
|
250
|
jpayne@69
|
251 Incremented by the -i command line option. If set to -1 (default),
|
jpayne@69
|
252 inherit Py_InteractiveFlag value. */
|
jpayne@69
|
253 int interactive;
|
jpayne@69
|
254
|
jpayne@69
|
255 /* Optimization level.
|
jpayne@69
|
256
|
jpayne@69
|
257 Incremented by the -O command line option. Set by the PYTHONOPTIMIZE
|
jpayne@69
|
258 environment variable. If set to -1 (default), inherit Py_OptimizeFlag
|
jpayne@69
|
259 value. */
|
jpayne@69
|
260 int optimization_level;
|
jpayne@69
|
261
|
jpayne@69
|
262 /* If greater than 0, enable the debug mode: turn on parser debugging
|
jpayne@69
|
263 output (for expert only, depending on compilation options).
|
jpayne@69
|
264
|
jpayne@69
|
265 Incremented by the -d command line option. Set by the PYTHONDEBUG
|
jpayne@69
|
266 environment variable. If set to -1 (default), inherit Py_DebugFlag
|
jpayne@69
|
267 value. */
|
jpayne@69
|
268 int parser_debug;
|
jpayne@69
|
269
|
jpayne@69
|
270 /* If equal to 0, Python won't try to write ``.pyc`` files on the
|
jpayne@69
|
271 import of source modules.
|
jpayne@69
|
272
|
jpayne@69
|
273 Set to 0 by the -B command line option and the PYTHONDONTWRITEBYTECODE
|
jpayne@69
|
274 environment variable. If set to -1 (default), it is set to
|
jpayne@69
|
275 !Py_DontWriteBytecodeFlag. */
|
jpayne@69
|
276 int write_bytecode;
|
jpayne@69
|
277
|
jpayne@69
|
278 /* If greater than 0, enable the verbose mode: print a message each time a
|
jpayne@69
|
279 module is initialized, showing the place (filename or built-in module)
|
jpayne@69
|
280 from which it is loaded.
|
jpayne@69
|
281
|
jpayne@69
|
282 If greater or equal to 2, print a message for each file that is checked
|
jpayne@69
|
283 for when searching for a module. Also provides information on module
|
jpayne@69
|
284 cleanup at exit.
|
jpayne@69
|
285
|
jpayne@69
|
286 Incremented by the -v option. Set by the PYTHONVERBOSE environment
|
jpayne@69
|
287 variable. If set to -1 (default), inherit Py_VerboseFlag value. */
|
jpayne@69
|
288 int verbose;
|
jpayne@69
|
289
|
jpayne@69
|
290 /* If greater than 0, enable the quiet mode: Don't display the copyright
|
jpayne@69
|
291 and version messages even in interactive mode.
|
jpayne@69
|
292
|
jpayne@69
|
293 Incremented by the -q option. If set to -1 (default), inherit
|
jpayne@69
|
294 Py_QuietFlag value. */
|
jpayne@69
|
295 int quiet;
|
jpayne@69
|
296
|
jpayne@69
|
297 /* If greater than 0, don't add the user site-packages directory to
|
jpayne@69
|
298 sys.path.
|
jpayne@69
|
299
|
jpayne@69
|
300 Set to 0 by the -s and -I command line options , and the PYTHONNOUSERSITE
|
jpayne@69
|
301 environment variable. If set to -1 (default), it is set to
|
jpayne@69
|
302 !Py_NoUserSiteDirectory. */
|
jpayne@69
|
303 int user_site_directory;
|
jpayne@69
|
304
|
jpayne@69
|
305 /* If non-zero, configure C standard steams (stdio, stdout,
|
jpayne@69
|
306 stderr):
|
jpayne@69
|
307
|
jpayne@69
|
308 - Set O_BINARY mode on Windows.
|
jpayne@69
|
309 - If buffered_stdio is equal to zero, make streams unbuffered.
|
jpayne@69
|
310 Otherwise, enable streams buffering if interactive is non-zero. */
|
jpayne@69
|
311 int configure_c_stdio;
|
jpayne@69
|
312
|
jpayne@69
|
313 /* If equal to 0, enable unbuffered mode: force the stdout and stderr
|
jpayne@69
|
314 streams to be unbuffered.
|
jpayne@69
|
315
|
jpayne@69
|
316 Set to 0 by the -u option. Set by the PYTHONUNBUFFERED environment
|
jpayne@69
|
317 variable.
|
jpayne@69
|
318 If set to -1 (default), it is set to !Py_UnbufferedStdioFlag. */
|
jpayne@69
|
319 int buffered_stdio;
|
jpayne@69
|
320
|
jpayne@69
|
321 /* Encoding of sys.stdin, sys.stdout and sys.stderr.
|
jpayne@69
|
322 Value set from PYTHONIOENCODING environment variable and
|
jpayne@69
|
323 Py_SetStandardStreamEncoding() function.
|
jpayne@69
|
324 See also 'stdio_errors' attribute. */
|
jpayne@69
|
325 wchar_t *stdio_encoding;
|
jpayne@69
|
326
|
jpayne@69
|
327 /* Error handler of sys.stdin and sys.stdout.
|
jpayne@69
|
328 Value set from PYTHONIOENCODING environment variable and
|
jpayne@69
|
329 Py_SetStandardStreamEncoding() function.
|
jpayne@69
|
330 See also 'stdio_encoding' attribute. */
|
jpayne@69
|
331 wchar_t *stdio_errors;
|
jpayne@69
|
332
|
jpayne@69
|
333 #ifdef MS_WINDOWS
|
jpayne@69
|
334 /* If greater than zero, use io.FileIO instead of WindowsConsoleIO for sys
|
jpayne@69
|
335 standard streams.
|
jpayne@69
|
336
|
jpayne@69
|
337 Set to 1 if the PYTHONLEGACYWINDOWSSTDIO environment variable is set to
|
jpayne@69
|
338 a non-empty string. If set to -1 (default), inherit
|
jpayne@69
|
339 Py_LegacyWindowsStdioFlag value.
|
jpayne@69
|
340
|
jpayne@69
|
341 See PEP 528 for more details. */
|
jpayne@69
|
342 int legacy_windows_stdio;
|
jpayne@69
|
343 #endif
|
jpayne@69
|
344
|
jpayne@69
|
345 /* Value of the --check-hash-based-pycs command line option:
|
jpayne@69
|
346
|
jpayne@69
|
347 - "default" means the 'check_source' flag in hash-based pycs
|
jpayne@69
|
348 determines invalidation
|
jpayne@69
|
349 - "always" causes the interpreter to hash the source file for
|
jpayne@69
|
350 invalidation regardless of value of 'check_source' bit
|
jpayne@69
|
351 - "never" causes the interpreter to always assume hash-based pycs are
|
jpayne@69
|
352 valid
|
jpayne@69
|
353
|
jpayne@69
|
354 The default value is "default".
|
jpayne@69
|
355
|
jpayne@69
|
356 See PEP 552 "Deterministic pycs" for more details. */
|
jpayne@69
|
357 wchar_t *check_hash_pycs_mode;
|
jpayne@69
|
358
|
jpayne@69
|
359 /* --- Path configuration inputs ------------ */
|
jpayne@69
|
360
|
jpayne@69
|
361 /* If greater than 0, suppress _PyPathConfig_Calculate() warnings on Unix.
|
jpayne@69
|
362 The parameter has no effect on Windows.
|
jpayne@69
|
363
|
jpayne@69
|
364 If set to -1 (default), inherit !Py_FrozenFlag value. */
|
jpayne@69
|
365 int pathconfig_warnings;
|
jpayne@69
|
366
|
jpayne@69
|
367 wchar_t *pythonpath_env; /* PYTHONPATH environment variable */
|
jpayne@69
|
368 wchar_t *home; /* PYTHONHOME environment variable,
|
jpayne@69
|
369 see also Py_SetPythonHome(). */
|
jpayne@69
|
370
|
jpayne@69
|
371 /* --- Path configuration outputs ----------- */
|
jpayne@69
|
372
|
jpayne@69
|
373 int module_search_paths_set; /* If non-zero, use module_search_paths */
|
jpayne@69
|
374 PyWideStringList module_search_paths; /* sys.path paths. Computed if
|
jpayne@69
|
375 module_search_paths_set is equal
|
jpayne@69
|
376 to zero. */
|
jpayne@69
|
377
|
jpayne@69
|
378 wchar_t *executable; /* sys.executable */
|
jpayne@69
|
379 wchar_t *base_executable; /* sys._base_executable */
|
jpayne@69
|
380 wchar_t *prefix; /* sys.prefix */
|
jpayne@69
|
381 wchar_t *base_prefix; /* sys.base_prefix */
|
jpayne@69
|
382 wchar_t *exec_prefix; /* sys.exec_prefix */
|
jpayne@69
|
383 wchar_t *base_exec_prefix; /* sys.base_exec_prefix */
|
jpayne@69
|
384
|
jpayne@69
|
385 /* --- Parameter only used by Py_Main() ---------- */
|
jpayne@69
|
386
|
jpayne@69
|
387 /* Skip the first line of the source ('run_filename' parameter), allowing use of non-Unix forms of
|
jpayne@69
|
388 "#!cmd". This is intended for a DOS specific hack only.
|
jpayne@69
|
389
|
jpayne@69
|
390 Set by the -x command line option. */
|
jpayne@69
|
391 int skip_source_first_line;
|
jpayne@69
|
392
|
jpayne@69
|
393 wchar_t *run_command; /* -c command line argument */
|
jpayne@69
|
394 wchar_t *run_module; /* -m command line argument */
|
jpayne@69
|
395 wchar_t *run_filename; /* Trailing command line argument without -c or -m */
|
jpayne@69
|
396
|
jpayne@69
|
397 /* --- Private fields ---------------------------- */
|
jpayne@69
|
398
|
jpayne@69
|
399 /* Install importlib? If set to 0, importlib is not initialized at all.
|
jpayne@69
|
400 Needed by freeze_importlib. */
|
jpayne@69
|
401 int _install_importlib;
|
jpayne@69
|
402
|
jpayne@69
|
403 /* If equal to 0, stop Python initialization before the "main" phase */
|
jpayne@69
|
404 int _init_main;
|
jpayne@69
|
405 } PyConfig;
|
jpayne@69
|
406
|
jpayne@69
|
407 PyAPI_FUNC(void) PyConfig_InitPythonConfig(PyConfig *config);
|
jpayne@69
|
408 PyAPI_FUNC(void) PyConfig_InitIsolatedConfig(PyConfig *config);
|
jpayne@69
|
409 PyAPI_FUNC(void) PyConfig_Clear(PyConfig *);
|
jpayne@69
|
410 PyAPI_FUNC(PyStatus) PyConfig_SetString(
|
jpayne@69
|
411 PyConfig *config,
|
jpayne@69
|
412 wchar_t **config_str,
|
jpayne@69
|
413 const wchar_t *str);
|
jpayne@69
|
414 PyAPI_FUNC(PyStatus) PyConfig_SetBytesString(
|
jpayne@69
|
415 PyConfig *config,
|
jpayne@69
|
416 wchar_t **config_str,
|
jpayne@69
|
417 const char *str);
|
jpayne@69
|
418 PyAPI_FUNC(PyStatus) PyConfig_Read(PyConfig *config);
|
jpayne@69
|
419 PyAPI_FUNC(PyStatus) PyConfig_SetBytesArgv(
|
jpayne@69
|
420 PyConfig *config,
|
jpayne@69
|
421 Py_ssize_t argc,
|
jpayne@69
|
422 char * const *argv);
|
jpayne@69
|
423 PyAPI_FUNC(PyStatus) PyConfig_SetArgv(PyConfig *config,
|
jpayne@69
|
424 Py_ssize_t argc,
|
jpayne@69
|
425 wchar_t * const *argv);
|
jpayne@69
|
426 PyAPI_FUNC(PyStatus) PyConfig_SetWideStringList(PyConfig *config,
|
jpayne@69
|
427 PyWideStringList *list,
|
jpayne@69
|
428 Py_ssize_t length, wchar_t **items);
|
jpayne@69
|
429
|
jpayne@69
|
430 #ifdef __cplusplus
|
jpayne@69
|
431 }
|
jpayne@69
|
432 #endif
|
jpayne@69
|
433 #endif /* !Py_LIMITED_API */
|
jpayne@69
|
434 #endif /* !Py_PYCORECONFIG_H */
|