Last active
March 4, 2024 19:38
-
-
Save cnicolai/6c466d63838457ff3fe57dfe661734ce to your computer and use it in GitHub Desktop.
Run a shell script from python
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
import subprocess | |
# If arg3 is not a string, convert it to sringe before passing: arg3 = str(arg3) | |
subprocess.check_call(['/my/file/path/programname.sh', 'arg1', 'arg2', arg3]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment