Topic

Python

Collection size
2 articles
Page 1 of 1
Python Programming Learning Circle
Python Programming Learning Circle
Nov 19, 2021 · Fundamentals

Using Python to Execute Shell Commands: os.system, os.popen, commands, and subprocess

This article explains Python's built‑in methods for invoking shell commands—including os.system, os.popen, the commands module, and the subprocess module—detailing their return values, usage examples, and when to choose each approach for capturing command output.

Pythoncommand executionos module
0 likes · 4 min read
Using Python to Execute Shell Commands: os.system, os.popen, commands, and subprocess
Python Programming Learning Circle
Python Programming Learning Circle
Mar 31, 2020 · Backend Development

Four Ways to Execute Shell Commands in Python

This article explains four Python techniques—os.system, os.popen, the commands module, and subprocess—for running shell commands, comparing their ability to capture output, return status, and recommending subprocess as the most flexible modern solution.

ProgrammingPythoncommands
0 likes · 3 min read
Four Ways to Execute Shell Commands in Python