def _call(cmds, cwd=None):
 for c in cmds:
  if cwd:
   subprocess.check_call(c, cwd=cwd)
  else:
   subprocess.check_call(c)

def _call ( cmds , cwd = None ) : for c in cmds : if cwd : subprocess . check_call ( c , cwd = cwd ) else : subprocess . check_call ( c )
runs cmds using subprocess .