code: def parse_command(self, commandstr):
          
  
          if len(commandstr.split('|')) > 1:
              vals = []
              for cmd in commandstr.split('|'):
                  vals.append(self.parse_command(cmd))
              return vals
  
          cmdlist = commandstr.strip().split(' ')
          command = None
          keys = {}
          opts = []
  
          for key in cmdlist:
              v = key.strip().split('=')
              if len(v) > 1:
                  # Key
                  if len(v) > 2:
                      # Fix the stupidities in TS3 escaping
                      v = [v[0], '='.join(v[1:])]
                  key, value = v
                  keys[key] = self._unescape_str(value)
              elif not v == ['']:
                  if v[0][0] and v[0][0] == '-':
                      # Option
                      opts.append(v[0][1:])
                  else:
                      command = v[0]
  
          d = {'keys': keys, 'opts': opts}
          if command:
              d['command'] = command
          return d
docs: Parses a TS3 command string into command/keys/opts tuple
          @param commandstr: Command string
          @type commandstr: string