python.md
1> **Источник:** https://python-all.ru/3.10/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.10/library/sys.html)12- [`sysconfig` – Предоставление доступа к конфигурационной информации Python](https://python-all.ru/3.10/library/sysconfig.html)1314 - [Переменные конфигурации](https://python-all.ru/3.10/library/sysconfig.html#configuration-variables)15 - [Пути установки](https://python-all.ru/3.10/library/sysconfig.html#installation-paths)16 - [Другие функции](https://python-all.ru/3.10/library/sysconfig.html#other-functions)17 - [Использование `sysconfig` в качестве скрипта](https://python-all.ru/3.10/library/sysconfig.html#using-sysconfig-as-a-script)18- [`builtins` – Встроенные объекты](https://python-all.ru/3.10/library/builtins.html)19- [`__main__` – Окружение кода верхнего уровня](https://python-all.ru/3.10/library/__main__.html)2021 - [`__name__ == '__main__'`](https://python-all.ru/3.10/library/__main__.html#name-main)2223 - [Что такое «окружение кода верхнего уровня»?](https://python-all.ru/3.10/library/__main__.html#what-is-the-top-level-code-environment)24 - [Идиоматическое использование](https://python-all.ru/3.10/library/__main__.html#idiomatic-usage)25 - [Особенности упаковки](https://python-all.ru/3.10/library/__main__.html#packaging-considerations)26 - [`__main__.py` в пакетах Python](https://python-all.ru/3.10/library/__main__.html#main-py-in-python-packages)2728 - [Идиоматическое использование](https://python-all.ru/3.10/library/__main__.html#id1)29 - [`import __main__`](https://python-all.ru/3.10/library/__main__.html#import-main)30- [`warnings` – Управление предупреждениями](https://python-all.ru/3.10/library/warnings.html)3132 - [Категории предупреждений](https://python-all.ru/3.10/library/warnings.html#warning-categories)33 - [Фильтр предупреждений](https://python-all.ru/3.10/library/warnings.html#the-warnings-filter)3435 - [Описание фильтров предупреждений](https://python-all.ru/3.10/library/warnings.html#describing-warning-filters)36 - [Фильтр предупреждений по умолчанию](https://python-all.ru/3.10/library/warnings.html#default-warning-filter)37 - [Переопределение фильтра по умолчанию](https://python-all.ru/3.10/library/warnings.html#overriding-the-default-filter)38 - [Временное подавление предупреждений](https://python-all.ru/3.10/library/warnings.html#temporarily-suppressing-warnings)39 - [Тестирование предупреждений](https://python-all.ru/3.10/library/warnings.html#testing-warnings)40 - [Обновление кода для новых версий зависимостей](https://python-all.ru/3.10/library/warnings.html#updating-code-for-new-versions-of-dependencies)41 - [Доступные функции](https://python-all.ru/3.10/library/warnings.html#available-functions)42 - [Доступные контекстные менеджеры](https://python-all.ru/3.10/library/warnings.html#available-context-managers)43- [`dataclasses` – Классы данных](https://python-all.ru/3.10/library/dataclasses.html)4445 - [Содержание модуля](https://python-all.ru/3.10/library/dataclasses.html#module-contents)46 - [Обработка после инициализации](https://python-all.ru/3.10/library/dataclasses.html#post-init-processing)47 - [Переменные класса](https://python-all.ru/3.10/library/dataclasses.html#class-variables)48 - [Переменные только для инициализации](https://python-all.ru/3.10/library/dataclasses.html#init-only-variables)49 - [Неизменяемые экземпляры](https://python-all.ru/3.10/library/dataclasses.html#frozen-instances)50 - [Наследование](https://python-all.ru/3.10/library/dataclasses.html#inheritance)51 - [Переупорядочивание именованных параметров в `__init__()`](https://python-all.ru/3.10/library/dataclasses.html#re-ordering-of-keyword-only-parameters-in-init)52 - [Функции-фабрики по умолчанию](https://python-all.ru/3.10/library/dataclasses.html#default-factory-functions)53 - [Изменяемые значения по умолчанию](https://python-all.ru/3.10/library/dataclasses.html#mutable-default-values)54 - [Поля с типом дескриптора](https://python-all.ru/3.10/library/dataclasses.html#descriptor-typed-fields)55- [`contextlib` – Утилиты для контекстов оператора `with`](https://python-all.ru/3.10/library/contextlib.html)5657 - [Утилиты](https://python-all.ru/3.10/library/contextlib.html#utilities)58 - [Примеры и рецепты](https://python-all.ru/3.10/library/contextlib.html#examples-and-recipes)5960 - [Поддержка переменного числа менеджеров контекста](https://python-all.ru/3.10/library/contextlib.html#supporting-a-variable-number-of-context-managers)61 - [Перехват исключений из методов `__enter__`](https://python-all.ru/3.10/library/contextlib.html#catching-exceptions-from-enter-methods)62 - [Очистка в реализации `__enter__`](https://python-all.ru/3.10/library/contextlib.html#cleaning-up-in-an-enter-implementation)63 - [Замена использования `try-finally` и флаговых переменных](https://python-all.ru/3.10/library/contextlib.html#replacing-any-use-of-try-finally-and-flag-variables)64 - [Использование менеджера контекста в качестве декоратора функции](https://python-all.ru/3.10/library/contextlib.html#using-a-context-manager-as-a-function-decorator)65 - [Одноразовые, многократно используемые и реентерабельные менеджеры контекста](https://python-all.ru/3.10/library/contextlib.html#single-use-reusable-and-reentrant-context-managers)6667 - [Реентерабельные менеджеры контекста](https://python-all.ru/3.10/library/contextlib.html#reentrant-context-managers)68 - [Повторно используемые менеджеры контекста](https://python-all.ru/3.10/library/contextlib.html#reusable-context-managers)69- [`abc` – Абстрактные базовые классы](https://python-all.ru/3.10/library/abc.html)70- [`atexit` – Обработчики выхода](https://python-all.ru/3.10/library/atexit.html)7172 - [`atexit` Пример](https://python-all.ru/3.10/library/atexit.html#atexit-example)73- [`traceback` – Печать или получение трассировки стека](https://python-all.ru/3.10/library/traceback.html)7475 - [Объекты `TracebackException`](https://python-all.ru/3.10/library/traceback.html#tracebackexception-objects)76 - [Объекты `StackSummary`](https://python-all.ru/3.10/library/traceback.html#stacksummary-objects)77 - [Объекты `FrameSummary`](https://python-all.ru/3.10/library/traceback.html#framesummary-objects)78 - [Примеры Traceback](https://python-all.ru/3.10/library/traceback.html#traceback-examples)79- [`__future__` – Определения операторов future](https://python-all.ru/3.10/library/__future__.html)80- [`gc` – Интерфейс сборщика мусора](https://python-all.ru/3.10/library/gc.html)81- [`inspect` – Инспекция живых объектов](https://python-all.ru/3.10/library/inspect.html)8283 - [Типы и члены](https://python-all.ru/3.10/library/inspect.html#types-and-members)84 - [Получение исходного кода](https://python-all.ru/3.10/library/inspect.html#retrieving-source-code)85 - [Интроспекция вызываемых объектов с помощью объекта Signature](https://python-all.ru/3.10/library/inspect.html#introspecting-callables-with-the-signature-object)86 - [Классы и функции](https://python-all.ru/3.10/library/inspect.html#classes-and-functions)87 - [Стек интерпретатора](https://python-all.ru/3.10/library/inspect.html#the-interpreter-stack)88 - [Получение атрибутов статически](https://python-all.ru/3.10/library/inspect.html#fetching-attributes-statically)89 - [Текущее состояние генераторов и корутин](https://python-all.ru/3.10/library/inspect.html#current-state-of-generators-and-coroutines)90 - [Битовые флаги объектов кода](https://python-all.ru/3.10/library/inspect.html#code-objects-bit-flags)91 - [Интерфейс командной строки](https://python-all.ru/3.10/library/inspect.html#command-line-interface)92- [`site` – Перехватчик конфигурации для конкретного сайта](https://python-all.ru/3.10/library/site.html)9394 - [Конфигурация readline](https://python-all.ru/3.10/library/site.html#readline-configuration)95 - [Содержание модуля](https://python-all.ru/3.10/library/site.html#module-contents)96 - [Интерфейс командной строки](https://python-all.ru/3.10/library/site.html#command-line-interface)97