ipc.md
1> **Источник:** https://python-all.ru/3.2/library/ipc.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# 17. Межпроцессное взаимодействие и работа с сетью89Модули, описанные в этой главе, предоставляют механизмы для взаимодействия разных процессов.1011Некоторые модули работают только для двух процессов, находящихся на одной машине, например, [`signal`](https://python-all.ru/3.2/library/signal.html#module-signal) и [`subprocess`](https://python-all.ru/3.2/library/subprocess.html#module-subprocess). Другие модули поддерживают сетевые протоколы, которые могут использоваться двумя или более процессами для обмена данными между машинами.1213Список модулей, описанных в этой главе:1415- [17.1. `subprocess` – Управление подпроцессами](https://python-all.ru/3.2/library/subprocess.html)1617 - [17.1.1. Использование модуля `subprocess`](https://python-all.ru/3.2/library/subprocess.html#using-the-subprocess-module)1819 - [17.1.1.1. Часто используемые аргументы](https://python-all.ru/3.2/library/subprocess.html#frequently-used-arguments)20 - [17.1.1.2. Конструктор Popen](https://python-all.ru/3.2/library/subprocess.html#popen-constructor)21 - [17.1.1.3. Исключения](https://python-all.ru/3.2/library/subprocess.html#exceptions)22 - [17.1.1.4. Безопасность](https://python-all.ru/3.2/library/subprocess.html#security)23 - [17.1.2. Объекты Popen](https://python-all.ru/3.2/library/subprocess.html#popen-objects)24 - [17.1.3. Вспомогательные функции Popen для Windows](https://python-all.ru/3.2/library/subprocess.html#windows-popen-helpers)2526 - [17.1.3.1. Константы](https://python-all.ru/3.2/library/subprocess.html#constants)27 - [17.1.4. Замена старых функций модулем `subprocess`](https://python-all.ru/3.2/library/subprocess.html#replacing-older-functions-with-the-subprocess-module)2829 - [17.1.4.1. Замена обратных кавычек оболочки /bin/sh](https://python-all.ru/3.2/library/subprocess.html#replacing-bin-sh-shell-backquote)30 - [17.1.4.2. Замена конвейера оболочки](https://python-all.ru/3.2/library/subprocess.html#replacing-shell-pipeline)31 - [17.1.4.3. Замена `os.system()`](https://python-all.ru/3.2/library/subprocess.html#replacing-os-system)32 - [17.1.4.4. Замена семейства `os.spawn`](https://python-all.ru/3.2/library/subprocess.html#replacing-the-os-spawn-family)33 - [17.1.4.5. Замена `os.popen()`, `os.popen2()`, `os.popen3()`](https://python-all.ru/3.2/library/subprocess.html#replacing-os-popen-os-popen2-os-popen3)34 - [17.1.4.6. Замена функций из модуля `popen2`](https://python-all.ru/3.2/library/subprocess.html#replacing-functions-from-the-popen2-module)35 - [17.1.5. Устаревшие функции вызова оболочки](https://python-all.ru/3.2/library/subprocess.html#legacy-shell-invocation-functions)36 - [17.1.6. Примечания](https://python-all.ru/3.2/library/subprocess.html#notes)3738 - [17.1.6.1. Преобразование последовательности аргументов в строку в Windows](https://python-all.ru/3.2/library/subprocess.html#converting-an-argument-sequence-to-a-string-on-windows)39- [17.2. `socket` – Низкоуровневый сетевой интерфейс](https://python-all.ru/3.2/library/socket.html)4041 - [17.2.1. Семейства сокетов](https://python-all.ru/3.2/library/socket.html#socket-families)42 - [17.2.2. Содержимое модуля](https://python-all.ru/3.2/library/socket.html#module-contents)43 - [17.2.3. Объекты сокетов](https://python-all.ru/3.2/library/socket.html#socket-objects)44 - [17.2.4. Замечания по тайм-аутам сокетов](https://python-all.ru/3.2/library/socket.html#notes-on-socket-timeouts)4546 - [17.2.4.1. Тайм-ауты и метод `connect`](https://python-all.ru/3.2/library/socket.html#timeouts-and-the-connect-method)47 - [17.2.4.2. Тайм-ауты и метод `accept`](https://python-all.ru/3.2/library/socket.html#timeouts-and-the-accept-method)48 - [17.2.5. Пример](https://python-all.ru/3.2/library/socket.html#example)49- [17.3. `ssl` – обёртка TLS/SSL для объектов сокетов](https://python-all.ru/3.2/library/ssl.html)5051 - [17.3.1. Функции, константы и исключения](https://python-all.ru/3.2/library/ssl.html#functions-constants-and-exceptions)5253 - [17.3.1.1. Создание сокетов](https://python-all.ru/3.2/library/ssl.html#socket-creation)54 - [17.3.1.2. Генерация случайных чисел](https://python-all.ru/3.2/library/ssl.html#random-generation)55 - [17.3.1.3. Работа с сертификатами](https://python-all.ru/3.2/library/ssl.html#certificate-handling)56 - [17.3.1.4. Константы](https://python-all.ru/3.2/library/ssl.html#constants)57 - [17.3.2. SSL-сокеты](https://python-all.ru/3.2/library/ssl.html#ssl-sockets)58 - [17.3.3. SSL-контексты](https://python-all.ru/3.2/library/ssl.html#ssl-contexts)59 - [17.3.4. Сертификаты](https://python-all.ru/3.2/library/ssl.html#certificates)6061 - [17.3.4.1. Цепочки сертификатов](https://python-all.ru/3.2/library/ssl.html#certificate-chains)62 - [17.3.4.2. Сертификаты CA](https://python-all.ru/3.2/library/ssl.html#ca-certificates)63 - [17.3.4.3. Совмещённые ключ и сертификат](https://python-all.ru/3.2/library/ssl.html#combined-key-and-certificate)64 - [17.3.4.4. Самоподписанные сертификаты](https://python-all.ru/3.2/library/ssl.html#self-signed-certificates)65 - [17.3.5. Примеры](https://python-all.ru/3.2/library/ssl.html#examples)6667 - [17.3.5.1. Проверка поддержки SSL](https://python-all.ru/3.2/library/ssl.html#testing-for-ssl-support)68 - [17.3.5.2. Работа на стороне клиента](https://python-all.ru/3.2/library/ssl.html#client-side-operation)69 - [17.3.5.3. Работа на стороне сервера](https://python-all.ru/3.2/library/ssl.html#server-side-operation)70 - [17.3.6. Замечания по неблокирующим сокетам](https://python-all.ru/3.2/library/ssl.html#notes-on-non-blocking-sockets)71 - [17.3.7. Вопросы безопасности](https://python-all.ru/3.2/library/ssl.html#security-considerations)7273 - [17.3.7.1. Проверка сертификатов](https://python-all.ru/3.2/library/ssl.html#verifying-certificates)74 - [17.3.7.2. Версии протоколов](https://python-all.ru/3.2/library/ssl.html#protocol-versions)75 - [17.3.7.3. Выбор шифров](https://python-all.ru/3.2/library/ssl.html#cipher-selection)76- [17.4. `signal` – Установка обработчиков для асинхронных событий](https://python-all.ru/3.2/library/signal.html)7778 - [17.4.1. Общие правила](https://python-all.ru/3.2/library/signal.html#general-rules)7980 - [17.4.1.1. Выполнение обработчиков сигналов Python](https://python-all.ru/3.2/library/signal.html#execution-of-python-signal-handlers)81 - [17.4.1.2. Сигналы и потоки](https://python-all.ru/3.2/library/signal.html#signals-and-threads)82 - [17.4.2. Содержимое модуля](https://python-all.ru/3.2/library/signal.html#module-contents)83 - [17.4.3. Пример](https://python-all.ru/3.2/library/signal.html#example)84- [17.5. `asyncore` – Асинхронный обработчик сокетов](https://python-all.ru/3.2/library/asyncore.html)8586 - [17.5.1. asyncore – пример базового HTTP-клиента](https://python-all.ru/3.2/library/asyncore.html#asyncore-example-basic-http-client)87 - [17.5.2. asyncore – пример базового эхо-сервера](https://python-all.ru/3.2/library/asyncore.html#asyncore-example-basic-echo-server)88- [17.6. `asynchat` – Асинхронный обработчик команд/ответов сокетов](https://python-all.ru/3.2/library/asynchat.html)8990 - [17.6.1. asynchat – Вспомогательные классы](https://python-all.ru/3.2/library/asynchat.html#asynchat-auxiliary-classes)91 - [17.6.2. asynchat – пример](https://python-all.ru/3.2/library/asynchat.html#asynchat-example)92