def run_step(*args):
 global DRY_RUN
 cmd = args
 print(' '.join(cmd))
 if skip_step():
  print('--- Skipping...')
 elif DRY_RUN:
  print('--- Pretending to run...')
 else:
  subprocess.check_output(cmd)

def run_step ( * args ) : global DRY_RUN cmd = args print ( ' ' . join ( cmd ) ) if skip_step ( ) : print ( '--- Skipping...' ) elif DRY_RUN : print ( '--- Pretending to run...' ) else : subprocess . check_output ( cmd )
prints out the command and asks if it should be run .