get python to run cli commands

Solutions on MaxInterview for get python to run cli commands by the best coders in the world

showing results for - "get python to run cli commands"
Valentín
30 Aug 2016
1import os
2sequence = (
3	"git init",
4  	"git add ."
5)
6
7for i, x in enumerate(sequence):
8  print("{}. RUNNING: [{}]".format(i, x))
9  os.system(x)
10  
11#short explanation
12"""
13	1) Init sequence
14    2) Loop through sequence and use `os.system()` to run commands
15"""