code: def run_command(cmd, sudo=False):
      '''run_command uses subprocess to send a command to the terminal.
      :param cmd: the command to send, should be a list for subprocess
      :param error_message: the error message to give to user if fails,
      if none specified, will alert that command failed.
      :param sudopw: if specified (not None) command will be run asking for sudo
      '''
      if sudo is True:
          cmd = ['sudo'] + cmd
  
      output = Popen(cmd,stderr=STDOUT,stdout=PIPE)
      t = output.communicate()[0],output.returncode
      output = {'message':t[0],
                'return_code':t[1]}
  
      return outpuf run_command(cmd, sudo=False):
      '''run_command uses subprocess to send a command to the terminal.
      :param cmd: the command to send, should be a list for subprocess
      :param error_message: the error message to give to user if fails,
      if none specified, will alert that command failed.
      :param sudopw: if specified (not None) command will be run asking for sudo
      '''
      if sudo is True:
          cmd = ['sudo'] + cmd
  
      output = Popen(cmd,stderr=STDOUT,stdout=PIPE)
      t = output.communicate()[0],output.returncode
      output = {'message':t[0],
                'return_code':t[1]}
  
      return output
docs: run_command uses subprocess to send a command to the terminal.
      :param cmd: the command to send, should be a list for subprocess
      :param error_message: the error message to give to user if fails,
      if none specified, will alert that command failed.
      :param sudopw: if specified (not None) command will be run asking for sudo