python设置初始值_Python初始化配置

更新时间:2023-07-01 19:00:45 阅读: 评论:0

python设置初始值_Python初始化配置
xenu
Structure containing most parameters to configure Python.
Structure methods:
void PyConfig_InitPythonConfig(PyConfig*config)¶
Initialize configuration with Python Configuration.
void PyConfig_InitIsolatedConfig(PyConfig*config)¶
Initialize configuration with Isolated Configuration.
PyStatus PyConfig_SetString(PyConfig*config, wchar_t * const*config_str, const wchar_t*str)¶
Copy the wide character string str into *config_str.
Preinitialize Python if needed.
PyStatus PyConfig_SetBytesString(PyConfig*config, wchar_t * const*config_str, const char*str)¶
Decode str using Py_DecodeLocale() and t the result into *config_str.
Preinitialize Python if needed.
PyStatus PyConfig_SetArgv(PyConfig*config, intargc, wchar_t * const*argv)¶
Set command line arguments from wide character strings.
Preinitialize Python if needed.
PyStatus PyConfig_SetBytesArgv(PyConfig*config, intargc, char * const*argv)¶
Set command line arguments: decode bytes using Py_DecodeLocale().
Preinitialize Python if needed.
PyStatus PyConfig_SetWideStringList(PyConfig*config, PyWideStringList*list, Py_ssize_tlength, wchar_t**items)¶Set the list of wide strings list to length and items.
Preinitialize Python if needed.
PyStatus PyConfig_Read(PyConfig*config)¶
Read all Python configuration.
Fields which are already initialized are left unchanged.
Preinitialize Python if needed.
void PyConfig_Clear(PyConfig*config)¶
Relea configuration memory.
Most PyConfig methods preinitialize Python if needed. In that ca, the
Python preinitialization configuration in bad on the PyConfig.
If configuration fields which are in common with PyPreConfig are
tuned, they must be t before calling a PyConfig method:
Moreover, if PyConfig_SetArgv() or PyConfig_SetBytesArgv()bedroom
is ud, this method must be called first, before other methods, since the
preinitialization configuration depends on command line arguments (if par_argv is non-zero).
The caller of the methods is responsible to handle exceptions (error or exit) using PyStatus_Exception() and Py_ExitStatusException().
Structure fields:
Command line arguments, sys.argv. See
par_argv to par argv the
same way the regular Python pars Python command line arguments. If argv is empty, an empty string is added to ensure
that sys.argv always exists and is never empty.
wchar_t* ba_exec_prefix¶
wchar_t* ba_executable¶
sys._ba_executable: __PYVENV_LAUNCHER__ environment
variable value, or copy utable.
wchar_t* ba_prefix¶
wchar_t* platlibdir¶
sys.platlibdir: platform library directory name, t at configure time
by --with-platlibdir, overrideable by the PYTHONPLATLIBDIR
environment variable.
3.9 新版功能.
int buffered_stdio¶
If equals to 0, enable unbuffered mode, making the stdout and stderr streams unbuffered.
stdin is always opened in buffered mode.
int bytes_warning¶
If equals to 1, issue a warning when comparing bytes or
bytearray with str, or comparing bytes with
int. If equal or greater to 2, rai a BytesWarning
exception.
wchar_t* check_hash_pycs_mode¶
Control the validation behavior of hash-bad .pyc files (e
PEP 552): --check-hash-bad-pycs command line option value.
Valid values: always, never and default.
默认值为: default.
int configure_c_stdio¶
2016年4月2日If non-zero, configure C standard streams (stdio, stdout, stdout). For example, t their mode to O_BINARY on Windows. int dev_mode¶
If non-zero, enable the Python Development Mode.
int dump_refs¶
If non-zero, dump all objects which are still alive at exit.
Py_TRACE_REFS macro must be defined in build.
wchar_t* exec_prefix¶
wchar_t* executable¶
int faulthandler¶
enforcerIf non-zero, able() at startup.
洛神赋翻译
wchar_t* filesystem_encoding¶
wchar_t* filesystem_errors¶
unsigned long hash_ed¶
int u_hash_ed¶
Randomized hash function ed.
If u_hash_ed is zero, a ed is chon randomly
at Pythonstartup, and hash_ed is ignored.
wchar_t* home¶
有道翻译软件下载Python home directory.
Initialized from PYTHONHOME environment variable value by default.
int import_time¶
If non-zero, profile import time.
int inspect¶
Enter interactive mode after executing a script or a command. int install_signal_handlers¶
Install signal handlers?
int interactive¶
交互模式
int isolated¶
If greater than 0, enable isolated mode:
sys.path contains neither the script's directory (computed from
argv[0] or the current directory) nor the ur's site-packages
directory.
Python REPL doesn't import readline nor enable default readline configuration on interactive prompts.
int legacy_windows_stdio¶
If non-zero, u io.FileIO instead of
io.WindowsConsoleIO for sys.stdin, sys.stdout
and sys.stderr.
Only available on Windows. #ifdef MS_WINDOWS macro can be ud for Windows specific code.
int malloc_stats¶
If non-zero, dump statistics on Python pymalloc memory allocator at exit. The option is ignored if Python is built using --without-pymalloc.
wchar_t* pythonpath_env¶
Module arch paths as a string parated by DELIM
(os.path.pathp).
Initialized from PYTHONPATH environment variable value by
default.
PyWideStringList module_arch_paths¶
int module_arch_paths_t¶
chefsys.path. If module_arch_paths_t is
equal to 0, the module_arch_paths is overridden
by the function calculating the Path Configuration.
int optimization_level¶
Compilation optimization level:
0: Peephole optimizer (and __debug__ is t to True)
1: Remove asrtions, t __debug__ to Fal
2: Strip docstrings激扬青春梦
成都来福士int par_argv¶
If non-zero, par argv the same way the regular
Python command line arguments, and strip Python arguments from argv: e Command Line Arguments.
int parr_debug¶
If non-zero, turn on parr debugging output (for expert only, depending
on compilation options).
int pathconfig_warnings¶
If equal to 0, suppress warnings when calculating the Path
Configuration (Unix only, Windows does not log any
warning). Otherwi, warnings are written into stderr.
wchar_t* prefix¶
wchar_t* program_name¶
Program name. Ud to initialize executable, and in
early error messages.
tenne
wchar_t* pycache_prefix¶
sys.pycache_prefix: .pyc cache prefix.
If NULL, sys.pycache_prefix is t to None.
int quiet¶
Quiet mode. For example, don't display the copyright and version messages in interactive mode.
wchar_t* run_command¶
python3 -c COMMAND argument. Ud by Py_RunMain().
wchar_t* run_filename¶
python3 FILENAME argument. Ud by Py_RunMain().
wchar_t* run_module¶
python3 -m MODULE argument. Ud by Py_RunMain().
int show_ref_count¶
Show total reference count at exit?
Set to 1 by -X showrefcount command line option.
Need a debug build of Python (Py_REF_DEBUG macro must be defined).
int site_import¶
Import the site module at startup?
int skip_source_first_line¶
Skip the first line of the source?
wchar_t* stdio_encoding¶
wchar_t* stdio_errors¶
Encoding and encoding errors of sys.stdin, sys.stdout and
sys.stderr.
int tracemalloc¶

本文发布于:2023-07-01 19:00:45,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/78/1072666.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:软件   模式   青春
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图