Global web icon
python.org
https://docs.python.org/3/library/subprocess.html
subprocess — Subprocess management — Python 3.14.2 documentation
The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. This module intends to replace several older modules and functions:
Global web icon
python.org
https://docs.python.org/3/library/multiprocessing.…
multiprocessing — Process-based parallelism — Python 3.14.2 documentation
The return value can be 'fork', 'spawn', 'forkserver' or None. See Contexts and start methods. Added in version 3.4. Changed in version 3.8: On macOS, the spawn start method is now the default. The fork start method should be considered unsafe as it can lead to crashes of the subprocess. See bpo-33725.
Global web icon
python.org
https://docs.python.org/3/library/concurrent.futur…
concurrent.futures — Launching parallel tasks — Python 3.14.2 documentation
The concurrent.futures module provides a high-level interface for asynchronously executing callables. The asynchronous execution can be performed with threads, using ThreadPoolExecutor or InterpreterPoolExecutor, or separate processes, using ProcessPoolExecutor. Each implements the same interface, which is defined by the abstract Executor class.
Global web icon
python.org
https://docs.python.org/3/library/index.html
The Python Standard Library — Python 3.14.2 documentation
subprocess — Subprocess management sched — Event scheduler queue — A synchronized queue class contextvars — Context Variables _thread — Low-level threading API Networking and Interprocess Communication asyncio — Asynchronous I/O socket — Low-level networking interface ssl — TLS/SSL wrapper for socket objects
Global web icon
python.org
https://docs.python.org/3/library/asyncio.html
asyncio — Asynchronous I/O — Python 3.14.2 documentation
asyncio is a library to write concurrent code using the async/await syntax. asyncio is used as a foundation for multiple Python asynchronous frameworks that provide high-performance network and web-servers, database connection libraries, distributed task queues, etc. asyncio is often a perfect fit for IO-bound and high-level structured network code.
Global web icon
python.org
https://docs.python.org/3/library/shlex.html
shlex — Simple lexical analysis — Python 3.14.2 documentation
Executing commands quoted by this module on such shells can open up the possibility of a command injection vulnerability. Consider using functions that pass command arguments with lists such as subprocess.run() with shell=False. This idiom would be unsafe:
Global web icon
python.org
https://docs.python.org/3/library/multiprocessing.…
multiprocessing.shared_memory — Shared memory for direct access across ...
To avoid this issue, users of subprocess or standalone Python processes should set track to False when there is already another process in place that does the bookkeeping. track is ignored on Windows, which has its own tracking and automatically deletes shared memory when all handles to it have been closed.
Global web icon
python.org
https://docs.python.org/3/library/concurrency.html
Concurrent Execution — Python 3.14.2 documentation
Older high-level API Replacing Older Functions with the subprocess Module Replacing /bin/sh shell command substitution Replacing shell pipeline Replacing os.system() Replacing the os.spawn family Replacing os.popen() Legacy Shell Invocation Functions Notes Timeout Behavior Converting an argument sequence to a string on Windows Disable use of ...
Global web icon
python.org
https://docs.python.org/3/library/pty.html
pty — Pseudo-terminal utilities — Python 3.14.1 documentation
Source code: Lib/pty.py The pty module defines operations for handling the pseudo-terminal concept: starting another process and being able to write to and read from its controlling terminal progra...
Global web icon
python.org
https://docs.python.org/3/library/asyncio-api-inde…
High-level API Index — Python 3.14.2 documentation
Examples Executing a shell command. See also the subprocess APIs documentation. Streams ¶ High-level APIs to work with network IO.