code: def args2dict(s):
      
  
      d = {}
      while s:
          t, s = chop(s, 1, '=')
          if s.startswith('"'):
              # XXX: This function is used to parse strings from Skype. The question is,
              # how does Skype escape the double-quotes. The code below implements the
              # VisualBasic technique ("" -> ").
              i = 0
              while True:
                  i = s.find('"', i+1)
                  try:
                      if s[i+1] != '"':
                          break
                      else:
                          i += 1
                  except IndexError:
                      break
              if i > 0:
                  d[t] = s[1:i].replace('""', '"')
                  if s[i+1:i+3] == ', ':
                      i += 2
                  s = s[i+1:]
              else:
                  d[t] = s
                  break
          else:
              i = s.find(', ')
              if i >= 0:
                  d[t] = s[:i]
                  s = s[i+2:]
              else:
                  d[t] = s
                  break
      return d
docs: Converts a string or comma-separated 'ARG="a value"' or 'ARG=value2' strings
      into a dictionary.
  
      :Parameters:
        s : str or unicode
          Input string.
  
      :return: ``{'ARG': 'value'}`` dictionary.
      :rtype: dict