'Run command in interpreter'

def run_command(self, cmd, history=True, new_prompt=True):

    if (not cmd):
        cmd = ''
    elif history:
        self.add_to_history(cmd)
    self.interpreter.stdin_write.write(to_binary_string((cmd + '\n')))
    if (not self.multithreaded):
        self.interpreter.run_line()
        self.refresh.emit()
