Python tip 11: capture external command output

Опубликовано: 21 Октябрь 2024
на канале: learnbyexample
992
10

The `subprocess` module provides plethora of features to execute external commands, capturing output being one of them. In this tip, you'll learn two ways to do so:

passing `capture_output=True` to `subprocess.run()`
`subprocess.check_output()` if you only want `stdout`

This video is based on content from my "100 Page Python Intro" ebook: https://github.com/learnbyexample/100...