Документация Python неофициальный перевод

ipc.md

67 строк · 6.6 КБ · обычная страница · сырой текст · скачать

1> **Источник:** https://python-all.ru/3.1/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.1/library/signal.html#module-signal) и [`subprocess`](https://python-all.ru/3.1/library/subprocess.html#module-subprocess). Другие модули поддерживают сетевые протоколы, которые могут использоваться двумя или более процессами для обмена данными между машинами.1213Список модулей, описанных в этой главе:1415- [17.1. `subprocess` – Управление подпроцессами](https://python-all.ru/3.1/library/subprocess.html)1617  - [17.1.1. Использование модуля подпроцесса](https://python-all.ru/3.1/library/subprocess.html#using-the-subprocess-module)1819    - [17.1.1.1. Вспомогательные функции](https://python-all.ru/3.1/library/subprocess.html#convenience-functions)20    - [17.1.1.2. Исключения](https://python-all.ru/3.1/library/subprocess.html#exceptions)21    - [17.1.1.3. Безопасность](https://python-all.ru/3.1/library/subprocess.html#security)22  - [17.1.2. Объекты Popen](https://python-all.ru/3.1/library/subprocess.html#popen-objects)23  - [17.1.3. Вспомогательные функции Popen для Windows](https://python-all.ru/3.1/library/subprocess.html#windows-popen-helpers)2425    - [17.1.3.1. Константы](https://python-all.ru/3.1/library/subprocess.html#constants)26  - [17.1.4. Замена старых функций модулем подпроцесс](https://python-all.ru/3.1/library/subprocess.html#replacing-older-functions-with-the-subprocess-module)2728    - [17.1.4.1. Замена обратных кавычек оболочки /bin/sh](https://python-all.ru/3.1/library/subprocess.html#replacing-bin-sh-shell-backquote)29    - [17.1.4.2. Замена конвейера оболочки](https://python-all.ru/3.1/library/subprocess.html#replacing-shell-pipeline)30    - [17.1.4.3. Замена `os.system()`](https://python-all.ru/3.1/library/subprocess.html#replacing-os-system)31    - [17.1.4.4. Замена семейства `os.spawn`](https://python-all.ru/3.1/library/subprocess.html#replacing-the-os-spawn-family)32    - [17.1.4.5. Замена `os.popen()`, `os.popen2()`, `os.popen3()`](https://python-all.ru/3.1/library/subprocess.html#replacing-os-popen-os-popen2-os-popen3)33    - [17.1.4.6. Замена функций из модуля `popen2`](https://python-all.ru/3.1/library/subprocess.html#replacing-functions-from-the-popen2-module)34  - [17.1.5. Примечания](https://python-all.ru/3.1/library/subprocess.html#notes)3536    - [17.1.5.1. Преобразование последовательности аргументов в строку в Windows](https://python-all.ru/3.1/library/subprocess.html#converting-an-argument-sequence-to-a-string-on-windows)37- [17.2. `socket` – Низкоуровневый сетевой интерфейс](https://python-all.ru/3.1/library/socket.html)3839  - [17.2.1. Семейства сокетов](https://python-all.ru/3.1/library/socket.html#socket-families)40  - [17.2.2. Содержимое модуля](https://python-all.ru/3.1/library/socket.html#module-contents)41  - [17.2.3. Объекты сокетов](https://python-all.ru/3.1/library/socket.html#socket-objects)42  - [17.2.4. Замечания по тайм-аутам сокетов](https://python-all.ru/3.1/library/socket.html#notes-on-socket-timeouts)4344    - [17.2.4.1. Тайм-ауты и метод `connect`](https://python-all.ru/3.1/library/socket.html#timeouts-and-the-connect-method)45  - [17.2.5. Пример](https://python-all.ru/3.1/library/socket.html#example)46- [17.3. `ssl` – обёртка TLS/SSL для объектов сокетов](https://python-all.ru/3.1/library/ssl.html)4748  - [17.3.1. Функции, константы и исключения](https://python-all.ru/3.1/library/ssl.html#functions-constants-and-exceptions)49  - [17.3.2. Объекты SSLSocket](https://python-all.ru/3.1/library/ssl.html#sslsocket-objects)50  - [17.3.3. Сертификаты](https://python-all.ru/3.1/library/ssl.html#certificates)51  - [17.3.4. Примеры](https://python-all.ru/3.1/library/ssl.html#examples)5253    - [17.3.4.1. Проверка поддержки SSL](https://python-all.ru/3.1/library/ssl.html#testing-for-ssl-support)54    - [17.3.4.2. Работа на стороне клиента](https://python-all.ru/3.1/library/ssl.html#client-side-operation)55    - [17.3.4.3. Работа на стороне сервера](https://python-all.ru/3.1/library/ssl.html#server-side-operation)56- [17.4. `signal` – Установка обработчиков для асинхронных событий](https://python-all.ru/3.1/library/signal.html)5758  - [17.4.1. Пример](https://python-all.ru/3.1/library/signal.html#example)59- [17.5. `asyncore` – Асинхронный обработчик сокетов](https://python-all.ru/3.1/library/asyncore.html)6061  - [17.5.1. asyncore – пример базового HTTP-клиента](https://python-all.ru/3.1/library/asyncore.html#asyncore-example-basic-http-client)62  - [17.5.2. asyncore – пример базового эхо-сервера](https://python-all.ru/3.1/library/asyncore.html#asyncore-example-basic-echo-server)63- [17.6. `asynchat` – Асинхронный обработчик команд/ответов сокетов](https://python-all.ru/3.1/library/asynchat.html)6465  - [17.6.1. asynchat – Вспомогательные классы](https://python-all.ru/3.1/library/asynchat.html#asynchat-auxiliary-classes)66  - [17.6.2. asynchat – пример](https://python-all.ru/3.1/library/asynchat.html#asynchat-example)67