Created
August 26, 2025 19:11
-
-
Save bsnux/2749ed005783e6eabeeb2d6ddd1f0861 to your computer and use it in GitHub Desktop.
Running shell commands easily from Python (one-liner style)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from subprocess import check_output | |
| def run_cd(cmd): return check_output(cmd, shell=True).decode('utf-8').split('\n')[:-1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment