(1) General Commands Manual (1) - python [ -B ] [ -b ] [ -d ] [ -E ] [ -h ] [ -i ] [ -I ] [ -m - ] [ -q ] [ -R ] [ -O ] [ -OO ] [ -P ] [ -s ] [ -S ] [ -u ] [ -v ] [ -V ] [ -W ] [ -x ] [ -X ] [ -? ] [ --check-hash-based-pycs | | ] [ --help ] [ --help-env ] [ --help-xoptions ] [ --help-all ] [ -c | | - ] [ ] . (Python Tutorial). . ( ). ( INTERNET RESOURCES .) C C++. . . . pydoc. -B .pyc . PYTHONDONTWRITEBYTECODE. -b str(bytes_instance) str(bytearray_instance) bytes/bytearray str. ( -bb ) -c ( ). ( ). --check-hash-based-pycs mode .pyc . -d ( ). -E PYTHONPATH PYTHONHOME . -h - --help . --help-env . --help-xoptions -X . --help-all . -i -c . $PYTHONSTARTUP. . -I . -E -P -s. sys.path . PYTHON* . . -m _ sys.path .py . ( ). -O assert __debug__ (bytecode) .opt-1 .pyc. -OO -O (docstrings) (bytecode) .opt-2 .pyc. -P sys.path . PYTHONSAFEPATH. -q . . -R . PYTHONHASHSEED 0 . -s sys.path. -S site sys.path . site . -u stdout stderr (unbuffered). stdin. -v ( ) . . . -V --version . . -W . sys.stderr . ( ): -Wdefault # -Werror # -Walways # -Wall # -Walways -Wmodule # -Wonce # -Wignore # . -Wi -Wignore . : action:message:category:module:lineno . -W ignore::DeprecationWarning DeprecationWarning. action . message . category (: "DeprecationWarning"). . module ( ) . lineno . -W . -W ( ). PYTHONWARNINGS . warnings.filterwarnings() . -X . : -X cpu_count=N os.cpu_count() -X cpu_count=default PYTHON_CPU_COUNT -X dev " " CPython . : . : o -W default. o : PyMem_SetupDebugHooks(). o faulthandler (Python traceback) . o asyncio. o dev_mode sys.flags True. o io.IOBase close(). -X importtime . ( ) ( ). . python3 -X importtime -c 'import asyncio'. -X importtime=2 . cached . -X faulthandler faulthandler. -X frozen_modules=[on|off] . "on" ( "off" ). -X gil=[0|1] (1) (0) GIL. PYTHON_GIL. --disable-gil. -X int_max_str_digits= int<->str. . sys.int_info.default_max_str_digits. 0 . -X no_debug_ranges ( ) . pyc . -X perf "perf" . PYTHONPERFSUPPORT=1. -X perf_jit "perf" DWARF. PYTHON_PERF_JIT_SUPPORT=1. -X presite=MOD site. PYTHON_PRESITE. . -X pycache_prefix= .pyc . -X showrefcount . -X tracemalloc tracemalloc. . -X tracemalloc=NFRAME NFRAME . -X utf8 UTF-8 . -X utf8=0 UTF-8 ( ). PYTHONUTF8 . -X warn_default_encoding EncodingWarning 'encoding=None' -x . DOS . : ! UNIX: tty (EOF) -c command ( ) command. command . ! . sys.argv ( import sys ). sys.argv[0] -c sys.argv[0] '-c'. sys.argv. `>>>' ( ) `...'. sys.ps1 sys.ps2. EOF . . KeyboardInterrupt UNIX ( SIGPIPE IOError). stderr. ${prefix} ${exec_prefix} GNU . /usr/local. ${exec_prefix}/bin/python . ${prefix}/lib/python ${exec_prefix}/lib/python . ${prefix}/include/python ${exec_prefix}/include/python . PYTHONASYNCIODEBUG asyncio. PYTHON_BASIC_REPL REPL curses readline REPL . PYTHONBREAKPOINT 0 . (callable) . PYTHONCOERCECLOCALE 0 ASCII ( C POSIX) UTF-8. PYTHON_COLORS 1 . 0 . PYTHON_CPU_COUNT os.cpu_count os.process_cpu_count. -X cpu_count. PYTHONDEBUG -d. -d . PYTHONEXECUTABLE sys.argv[0] C. Mac OS X. PYTHONFAULTHANDLER faulthandler.enable() : SIGSEGV SIGFPE SIGABRT SIGBUS SIGILL . -X faulthandler. PYTHON_FROZEN_MODULES on off . on off . on ( ) off . -X frozen_modules. PYTHON_GIL 1 (GIL). 0 GIL. --disable-gil. -X gil. PYTHON_HISTORY ( ~/.python_history ). PYTHONNODEBUGRANGES ( ) . pyc . PYTHONDONTWRITEBYTECODE -B ( .pyc). PYTHONDEVMODE " " . -X dev. PYTHONHASHSEED "random" str bytes. PYTHONHASHSEED hash() . . [0,4294967295]. 0 . PYTHONHOME . ${prefix}/lib/python ${exec_prefix}/lib/python ${prefix} ${exec_prefix} /usr/local. $PYTHONHOME ${prefix} ${exec_prefix}. $PYTHONHOME ${prefix}:${exec_prefix}. PYTHONINSPECT -i. PYTHONINTMAXSTRDIGITS int int str. 0 . 2 4 8 16 32 . -X int_max_str_digits=NUMBER. PYTHONIOENCODING // _:_. _ str.encode. (stderr) _ 'backslashreplace'. PYTHONMALLOC / . malloc pymalloc. debug malloc_debug pymalloc_debug. pymalloc_debug . pymalloc. PYTHONMALLOCSTATS pymalloc pymalloc . $PYTHONMALLOC malloc(3) C pymalloc. PYTHONNOUSERSITE -s ( sys.path). PYTHONOPTIMIZE -O. -O . PYTHONPATH . $PATH : . . ${prefix}/lib/python ( PYTHONHOME ). $PYTHONPATH. $PYTHONPATH. sys.path. PYTHON_PERF_JIT_SUPPORT Linux perf DWARF. 0 . -X perf_jit. PYTHONPERFSUPPORT Linux perf . 0 . -X perf. PYTHONPLATLIBDIR sys.platlibdir. PYTHONPROFILEIMPORTTIME 1 (Python) . 2 . -X importtime . PYTHONPYCACHEPREFIX .pyc __pycache__ . -X pycache_prefix=PATH. PYTHONSAFEPATH sys.path . -P. PYTHONSTARTUP . . sys.ps1 sys.ps2 . PYTHONTRACEMALLOC tracemalloc. . PYTHONTRACEMALLOC=1 . PYTHONUNBUFFERED -u. PYTHONUSERBASE site-packages python -m pip install --user. PYTHONUTF8 1 " UTF-8" . 0 . PYTHONVERBOSE -v. -v . PYTHONWARNDEFAULTENCODING EncodingWarning . PYTHONWARNINGS -W . --with-pydebug. PYTHONDUMPREFS . PYTHONDUMPREFSFILE . PYTHON_PRESITE site __main__. . -X presite=module. : https://www.python.org/psf/ : https://www.python.org/ : https://docs.python.org/ : https://devguide.python.org/ : https://www.python.org/downloads/ : https://pypi.org/ : comp.lang.python comp.lang.python.announce . "LICENSE" . 3 . . : . (1)