def DictToStr(d, delimiter=DELIMITER):
  out = []
  for key, value in d.iteritems():
    if value is None:
      out.append('%s=' % key)
    else:
      if isinstance(value, basestring):
        value = value.decode('utf-8')
      out.append('%s=%s' % (key, value))
  return delimiter.join(out).encode('utf-8')
Returns a passed dict as a key=value string with a defined delimiter.
dataset/ETHPy150Open google/simian/src/simian/mac/client/flight_common.py/DictToStr