'Execute a command
cmd: one-line command only, with \'
\' at the end'

def execute_command(self, cmd):

    if self.input_mode:
        self.end_input(cmd)
        return
    if cmd.endswith('\n'):
        cmd = cmd[:(-1)]
    if (cmd == 'cls'):
        self.clear_terminal()
        return
    self.run_command(cmd)
