code: def _style_to_xlwt(cls, item, firstlevel=True, field_sep=',',
                         line_sep=';'):
          
          if hasattr(item, 'items'):
              if firstlevel:
                  it = ["{key}: {val}"
                        .format(key=key, val=cls._style_to_xlwt(value, False))
                        for key, value in item.items()]
                  out = "{sep} ".format(sep=(line_sep).join(it))
                  return out
              else:
                  it = ["{key} {val}"
                        .format(key=key, val=cls._style_to_xlwt(value, False))
                        for key, value in item.items()]
                  out = "{sep} ".format(sep=(field_sep).join(it))
                  return out
          else:
              item = "{item}".format(item=item)
              item = item.replace("True", "on")
              item = item.replace("False", "off")
              return item
docs: helper which recursively generate an xlwt easy style string
          for example:
  
              hstyle = {"font": {"bold": True},
              "border": {"top": "thin",
                      "right": "thin",
                      "bottom": "thin",
                      "left": "thin"},
              "align": {"horiz": "center"}}
              will be converted to
              font: bold on; \
                      border: top thin, right thin, bottom thin, left thin; \
                      align: horiz center;