ipc.md
1> **Источник:** https://python-all.ru/2.7/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/2.7/library/signal.html#module-signal) и [`subprocess`](https://python-all.ru/2.7/library/subprocess.html#module-subprocess). Другие модули поддерживают сетевые протоколы, которые могут использоваться двумя или более процессами для взаимодействия между машинами.1213Список модулей, описанных в этой главе:1415- [17.1. `subprocess` – Управление подпроцессами](https://python-all.ru/2.7/library/subprocess.html)1617 - [17.1.1. Использование модуля `subprocess`](https://python-all.ru/2.7/library/subprocess.html#using-the-subprocess-module)1819 - [17.1.1.1. Часто используемые аргументы](https://python-all.ru/2.7/library/subprocess.html#frequently-used-arguments)20 - [17.1.1.2. Конструктор Popen](https://python-all.ru/2.7/library/subprocess.html#popen-constructor)21 - [17.1.1.3. Исключения](https://python-all.ru/2.7/library/subprocess.html#exceptions)22 - [17.1.1.4. Безопасность](https://python-all.ru/2.7/library/subprocess.html#security)23 - [17.1.2. Объекты Popen](https://python-all.ru/2.7/library/subprocess.html#popen-objects)24 - [17.1.3. Вспомогательные функции Popen для Windows](https://python-all.ru/2.7/library/subprocess.html#windows-popen-helpers)2526 - [17.1.3.1. Константы](https://python-all.ru/2.7/library/subprocess.html#constants)27 - [17.1.4. Замена старых функций модулем `subprocess`](https://python-all.ru/2.7/library/subprocess.html#replacing-older-functions-with-the-subprocess-module)2829 - [17.1.4.1. Замена обратных кавычек оболочки /bin/sh](https://python-all.ru/2.7/library/subprocess.html#replacing-bin-sh-shell-backquote)30 - [17.1.4.2. Замена конвейера оболочки](https://python-all.ru/2.7/library/subprocess.html#replacing-shell-pipeline)31 - [17.1.4.3. Замена `os.system()`](https://python-all.ru/2.7/library/subprocess.html#replacing-os-system)32 - [17.1.4.4. Замена семейства `os.spawn`](https://python-all.ru/2.7/library/subprocess.html#replacing-the-os-spawn-family)33 - [17.1.4.5. Замена `os.popen()`, `os.popen2()`, `os.popen3()`](https://python-all.ru/2.7/library/subprocess.html#replacing-os-popen-os-popen2-os-popen3)34 - [17.1.4.6. Замена функций из модуля `popen2`](https://python-all.ru/2.7/library/subprocess.html#replacing-functions-from-the-popen2-module)35 - [17.1.5. Примечания](https://python-all.ru/2.7/library/subprocess.html#notes)3637 - [17.1.5.1. Преобразование последовательности аргументов в строку в Windows](https://python-all.ru/2.7/library/subprocess.html#converting-an-argument-sequence-to-a-string-on-windows)38- [17.2. `socket` – Низкоуровневый сетевой интерфейс](https://python-all.ru/2.7/library/socket.html)3940 - [17.2.1. Объекты сокетов](https://python-all.ru/2.7/library/socket.html#socket-objects)41 - [17.2.2. Пример](https://python-all.ru/2.7/library/socket.html#example)42- [17.3. `ssl` – Обёртка TLS/SSL для объектов сокетов](https://python-all.ru/2.7/library/ssl.html)4344 - [17.3.1. Функции, константы и исключения](https://python-all.ru/2.7/library/ssl.html#functions-constants-and-exceptions)4546 - [17.3.1.1. Создание сокетов](https://python-all.ru/2.7/library/ssl.html#socket-creation)47 - [17.3.1.2. Создание контекста](https://python-all.ru/2.7/library/ssl.html#context-creation)48 - [17.3.1.3. Генерация случайных чисел](https://python-all.ru/2.7/library/ssl.html#random-generation)49 - [17.3.1.4. Обработка сертификатов](https://python-all.ru/2.7/library/ssl.html#certificate-handling)50 - [17.3.1.5. Константы](https://python-all.ru/2.7/library/ssl.html#constants)51 - [17.3.2. SSL-сокеты](https://python-all.ru/2.7/library/ssl.html#ssl-sockets)52 - [17.3.3. SSL-контексты](https://python-all.ru/2.7/library/ssl.html#ssl-contexts)53 - [17.3.4. Сертификаты](https://python-all.ru/2.7/library/ssl.html#certificates)5455 - [17.3.4.1. Цепочки сертификатов](https://python-all.ru/2.7/library/ssl.html#certificate-chains)56 - [17.3.4.2. Сертификаты CA](https://python-all.ru/2.7/library/ssl.html#ca-certificates)57 - [17.3.4.3. Совмещённые ключ и сертификат](https://python-all.ru/2.7/library/ssl.html#combined-key-and-certificate)58 - [17.3.4.4. Самоподписанные сертификаты](https://python-all.ru/2.7/library/ssl.html#self-signed-certificates)59 - [17.3.5. Примеры](https://python-all.ru/2.7/library/ssl.html#examples)6061 - [17.3.5.1. Проверка поддержки SSL](https://python-all.ru/2.7/library/ssl.html#testing-for-ssl-support)62 - [17.3.5.2. Работа на стороне клиента](https://python-all.ru/2.7/library/ssl.html#client-side-operation)63 - [17.3.5.3. Работа на стороне сервера](https://python-all.ru/2.7/library/ssl.html#server-side-operation)64 - [17.3.6. Замечания по неблокирующим сокетам](https://python-all.ru/2.7/library/ssl.html#notes-on-non-blocking-sockets)65 - [17.3.7. Вопросы безопасности](https://python-all.ru/2.7/library/ssl.html#security-considerations)6667 - [17.3.7.1. Лучшие значения по умолчанию](https://python-all.ru/2.7/library/ssl.html#best-defaults)68 - [17.3.7.2. Ручная настройка](https://python-all.ru/2.7/library/ssl.html#manual-settings)6970 - [17.3.7.2.1. Проверка сертификатов](https://python-all.ru/2.7/library/ssl.html#verifying-certificates)71 - [17.3.7.2.2. Версии протоколов](https://python-all.ru/2.7/library/ssl.html#protocol-versions)72 - [17.3.7.2.3. Выбор шифров](https://python-all.ru/2.7/library/ssl.html#cipher-selection)73 - [17.3.7.3. Многопроцессная обработка](https://python-all.ru/2.7/library/ssl.html#multi-processing)74 - [17.3.8. Поддержка LibreSSL](https://python-all.ru/2.7/library/ssl.html#libressl-support)75- [17.4. `signal` – Установка обработчиков для асинхронных событий](https://python-all.ru/2.7/library/signal.html)7677 - [17.4.1. Пример](https://python-all.ru/2.7/library/signal.html#example)78- [17.5. `popen2` – Подпроцессы с доступными потоками ввода-вывода](https://python-all.ru/2.7/library/popen2.html)7980 - [17.5.1. Объекты Popen3 и Popen4](https://python-all.ru/2.7/library/popen2.html#popen3-and-popen4-objects)81 - [17.5.2. Проблемы управления потоком](https://python-all.ru/2.7/library/popen2.html#flow-control-issues)82- [17.6. `asyncore` – Асинхронный обработчик сокетов](https://python-all.ru/2.7/library/asyncore.html)8384 - [17.6.1. Пример asyncore: простой HTTP-клиент](https://python-all.ru/2.7/library/asyncore.html#asyncore-example-basic-http-client)85 - [17.6.2. Пример asyncore: простой эхо-сервер](https://python-all.ru/2.7/library/asyncore.html#asyncore-example-basic-echo-server)86- [17.7. `asynchat` – Асинхронный обработчик команд/ответов сокетов](https://python-all.ru/2.7/library/asynchat.html)8788 - [17.7.1. asynchat – вспомогательные классы](https://python-all.ru/2.7/library/asynchat.html#asynchat-auxiliary-classes)89 - [17.7.2. Пример asynchat](https://python-all.ru/2.7/library/asynchat.html#asynchat-example)90