def check_output_inside_dir(command, dirpath):
 with inside_dir(dirpath):
  return subprocess.check_output(shlex.split(command))

def check_output_inside_dir ( command , dirpath ) : with inside_dir ( dirpath ) : return subprocess . check_output ( shlex . split ( command ) )
run a command from inside a given directory .