code: def run_command(self, cmd, history=True, new_prompt=True):
          
          if not cmd:
              cmd = ''
          else:
              if history:
                  self.add_to_history(cmd)
          if not self.multithreaded:
              if 'input' not in cmd:
                  self.interpreter.stdin_write.write(
                                                  to_binary_string(cmd + '\n'))
                  self.interpreter.run_line()
                  self.refresh.emit()
              else:
                  self.write(_('In order to use commands like "raw_input" '
                               'or "input" run Spyder with the multithread '
                               'option (--multithread) from a system terminal'),
                             error=True)
          else:
              self.interpreter.stdin_write.write(to_binary_string(cmd + '\n'))
docs: Run command in interpreter