python.md
1> **Источник:** https://python-all.ru/3.11/library/python.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# Службы времени выполнения Python89Модули, описанные в этой главе, предоставляют широкий спектр сервисов, связанных с интерпретатором Python и его взаимодействием с окружением. Вот обзор:1011- [`sys` – Системно-зависимые параметры и функции](https://python-all.ru/3.11/library/sys.html)12- [`sysconfig` – Предоставление доступа к конфигурационной информации Python](https://python-all.ru/3.11/library/sysconfig.html)1314 - [Переменные конфигурации](https://python-all.ru/3.11/library/sysconfig.html#configuration-variables)15 - [Пути установки](https://python-all.ru/3.11/library/sysconfig.html#installation-paths)16 - [Схема пользователя](https://python-all.ru/3.11/library/sysconfig.html#user-scheme)1718 - [`posix_user`](https://python-all.ru/3.11/library/sysconfig.html#posix-user)19 - [`nt_user`](https://python-all.ru/3.11/library/sysconfig.html#nt-user)20 - [`osx_framework_user`](https://python-all.ru/3.11/library/sysconfig.html#osx-framework-user)21 - [Домашняя схема](https://python-all.ru/3.11/library/sysconfig.html#home-scheme)2223 - [`posix_home`](https://python-all.ru/3.11/library/sysconfig.html#posix-home)24 - [Схема префикса](https://python-all.ru/3.11/library/sysconfig.html#prefix-scheme)2526 - [`posix_prefix`](https://python-all.ru/3.11/library/sysconfig.html#posix-prefix)27 - [`nt`](https://python-all.ru/3.11/library/sysconfig.html#nt)28 - [Функции путей установки](https://python-all.ru/3.11/library/sysconfig.html#installation-path-functions)29 - [Другие функции](https://python-all.ru/3.11/library/sysconfig.html#other-functions)30 - [Использование `sysconfig` в качестве скрипта](https://python-all.ru/3.11/library/sysconfig.html#using-sysconfig-as-a-script)31- [`builtins` – Встроенные объекты](https://python-all.ru/3.11/library/builtins.html)32- [`__main__` – Окружение кода верхнего уровня](https://python-all.ru/3.11/library/__main__.html)3334 - [`__name__ == '__main__'`](https://python-all.ru/3.11/library/__main__.html#name-main)3536 - [Что такое «окружение кода верхнего уровня»?](https://python-all.ru/3.11/library/__main__.html#what-is-the-top-level-code-environment)37 - [Идиоматическое использование](https://python-all.ru/3.11/library/__main__.html#idiomatic-usage)38 - [Особенности упаковки](https://python-all.ru/3.11/library/__main__.html#packaging-considerations)39 - [`__main__.py` в пакетах Python](https://python-all.ru/3.11/library/__main__.html#main-py-in-python-packages)4041 - [Идиоматическое использование](https://python-all.ru/3.11/library/__main__.html#id1)42 - [`import __main__`](https://python-all.ru/3.11/library/__main__.html#import-main)43- [`warnings` – Управление предупреждениями](https://python-all.ru/3.11/library/warnings.html)4445 - [Категории предупреждений](https://python-all.ru/3.11/library/warnings.html#warning-categories)46 - [Фильтр предупреждений](https://python-all.ru/3.11/library/warnings.html#the-warnings-filter)4748 - [Описание фильтров предупреждений](https://python-all.ru/3.11/library/warnings.html#describing-warning-filters)49 - [Фильтр предупреждений по умолчанию](https://python-all.ru/3.11/library/warnings.html#default-warning-filter)50 - [Переопределение фильтра по умолчанию](https://python-all.ru/3.11/library/warnings.html#overriding-the-default-filter)51 - [Временное подавление предупреждений](https://python-all.ru/3.11/library/warnings.html#temporarily-suppressing-warnings)52 - [Тестирование предупреждений](https://python-all.ru/3.11/library/warnings.html#testing-warnings)53 - [Обновление кода для новых версий зависимостей](https://python-all.ru/3.11/library/warnings.html#updating-code-for-new-versions-of-dependencies)54 - [Доступные функции](https://python-all.ru/3.11/library/warnings.html#available-functions)55 - [Доступные контекстные менеджеры](https://python-all.ru/3.11/library/warnings.html#available-context-managers)56- [`dataclasses` – Классы данных](https://python-all.ru/3.11/library/dataclasses.html)5758 - [Содержание модуля](https://python-all.ru/3.11/library/dataclasses.html#module-contents)59 - [Обработка после инициализации](https://python-all.ru/3.11/library/dataclasses.html#post-init-processing)60 - [Переменные класса](https://python-all.ru/3.11/library/dataclasses.html#class-variables)61 - [Переменные только для инициализации](https://python-all.ru/3.11/library/dataclasses.html#init-only-variables)62 - [Неизменяемые экземпляры](https://python-all.ru/3.11/library/dataclasses.html#frozen-instances)63 - [Наследование](https://python-all.ru/3.11/library/dataclasses.html#inheritance)64 - [Переупорядочивание именованных параметров в `__init__()`](https://python-all.ru/3.11/library/dataclasses.html#re-ordering-of-keyword-only-parameters-in-init)65 - [Функции-фабрики по умолчанию](https://python-all.ru/3.11/library/dataclasses.html#default-factory-functions)66 - [Изменяемые значения по умолчанию](https://python-all.ru/3.11/library/dataclasses.html#mutable-default-values)67 - [Поля с типом дескриптора](https://python-all.ru/3.11/library/dataclasses.html#descriptor-typed-fields)68- [`contextlib` – Утилиты для контекстов оператора `with`](https://python-all.ru/3.11/library/contextlib.html)6970 - [Утилиты](https://python-all.ru/3.11/library/contextlib.html#utilities)71 - [Примеры и рецепты](https://python-all.ru/3.11/library/contextlib.html#examples-and-recipes)7273 - [Поддержка переменного числа менеджеров контекста](https://python-all.ru/3.11/library/contextlib.html#supporting-a-variable-number-of-context-managers)74 - [Перехват исключений из методов `__enter__`](https://python-all.ru/3.11/library/contextlib.html#catching-exceptions-from-enter-methods)75 - [Очистка в реализации `__enter__`](https://python-all.ru/3.11/library/contextlib.html#cleaning-up-in-an-enter-implementation)76 - [Замена использования `try-finally` и флаговых переменных](https://python-all.ru/3.11/library/contextlib.html#replacing-any-use-of-try-finally-and-flag-variables)77 - [Использование менеджера контекста в качестве декоратора функции](https://python-all.ru/3.11/library/contextlib.html#using-a-context-manager-as-a-function-decorator)78 - [Одноразовые, многократно используемые и реентерабельные менеджеры контекста](https://python-all.ru/3.11/library/contextlib.html#single-use-reusable-and-reentrant-context-managers)7980 - [Реентерабельные менеджеры контекста](https://python-all.ru/3.11/library/contextlib.html#reentrant-context-managers)81 - [Повторно используемые менеджеры контекста](https://python-all.ru/3.11/library/contextlib.html#reusable-context-managers)82- [`abc` – Абстрактные базовые классы](https://python-all.ru/3.11/library/abc.html)83- [`atexit` – Обработчики выхода](https://python-all.ru/3.11/library/atexit.html)8485 - [`atexit` Пример](https://python-all.ru/3.11/library/atexit.html#atexit-example)86- [`traceback` – Печать или получение трассировки стека](https://python-all.ru/3.11/library/traceback.html)8788 - [Объекты `TracebackException`](https://python-all.ru/3.11/library/traceback.html#tracebackexception-objects)89 - [Объекты `StackSummary`](https://python-all.ru/3.11/library/traceback.html#stacksummary-objects)90 - [Объекты `FrameSummary`](https://python-all.ru/3.11/library/traceback.html#framesummary-objects)91 - [Примеры Traceback](https://python-all.ru/3.11/library/traceback.html#traceback-examples)92- [`__future__` – Определения операторов future](https://python-all.ru/3.11/library/__future__.html)9394 - [Содержимое модуля](https://python-all.ru/3.11/library/__future__.html#module-contents)95- [`gc` – Интерфейс сборщика мусора](https://python-all.ru/3.11/library/gc.html)96- [`inspect` – Инспекция живых объектов](https://python-all.ru/3.11/library/inspect.html)9798 - [Типы и члены](https://python-all.ru/3.11/library/inspect.html#types-and-members)99 - [Получение исходного кода](https://python-all.ru/3.11/library/inspect.html#retrieving-source-code)100 - [Интроспекция вызываемых объектов с помощью объекта Signature](https://python-all.ru/3.11/library/inspect.html#introspecting-callables-with-the-signature-object)101 - [Классы и функции](https://python-all.ru/3.11/library/inspect.html#classes-and-functions)102 - [Стек интерпретатора](https://python-all.ru/3.11/library/inspect.html#the-interpreter-stack)103 - [Получение атрибутов статически](https://python-all.ru/3.11/library/inspect.html#fetching-attributes-statically)104 - [Текущее состояние генераторов и корутин](https://python-all.ru/3.11/library/inspect.html#current-state-of-generators-and-coroutines)105 - [Битовые флаги объектов кода](https://python-all.ru/3.11/library/inspect.html#code-objects-bit-flags)106 - [Интерфейс командной строки](https://python-all.ru/3.11/library/inspect.html#command-line-interface)107- [`site` – Перехватчик конфигурации для конкретного сайта](https://python-all.ru/3.11/library/site.html)108109 - [`sitecustomize`](https://python-all.ru/3.11/library/site.html#module-sitecustomize)110 - [`usercustomize`](https://python-all.ru/3.11/library/site.html#module-usercustomize)111 - [Конфигурация readline](https://python-all.ru/3.11/library/site.html#readline-configuration)112 - [Содержание модуля](https://python-all.ru/3.11/library/site.html#module-contents)113 - [Интерфейс командной строки](https://python-all.ru/3.11/library/site.html#command-line-interface)114