code: def object2code(key, code):
      
  
      if key in ["xscale", "yscale"]:
          if code == "log":
              code = True
          else:
              code = False
  
      else:
          code = unicode(code)
  
      return code
docs: Returns code for widget from dict object