Last active
August 29, 2015 14:04
-
-
Save iamaziz/364b27f0ee65c7389cbc to your computer and use it in GitHub Desktop.
execute a terminal command in python with passing arguments
This file contains 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
# execute a terminal command in python with passing arguments | |
# python command-line arguments | |
import os | |
arg1 = "first_argument" | |
arg2 = "second_argument" | |
terminal_command = "python test.py {0} {1}".format(arg1, arg2) | |
os.system(terminal_command) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment