class_docstr: Hold config parsers for all idle config files in singleton instance.
  
  Default config files, self.defaultCfg --
      for config_type in self.config_types:
          (idle install dir)/config-{config-type}.def
  
  User config files, self.userCfg --
      for config_type in self.config_types:
      (user home dir)/.idlerc/config-{config-type}.cfg
class_docstr_tok: ["Hold","config","parsers","for","all","idle","config","files","in","singleton","instance",".","Default","config","files",",","self.defaultCfg","--","for","config_type","in","self.config_types",":","(","idle","install","dir",")","\/config-","{","config-type","}",".def","User","config","files",",","self.userCfg","--","for","config_type","in","self.config_types",":","(","user","home","dir",")","\/.idlerc\/config-","{","config-type","}",".cfg"]
docstr: Return {option:value} dict for elements in themeName.
  
  type - string, 'default' or 'user' theme type
  themeName - string, theme name
  Values are loaded over ultimate fallback defaults to guarantee
  that all theme elements are present in a newly created theme.
code: def GetThemeDict(self, type, themeName):
      """Return {option:value} dict for elements in themeName.
  
      type - string, 'default' or 'user' theme type
      themeName - string, theme name
      Values are loaded over ultimate fallback defaults to guarantee
      that all theme elements are present in a newly created theme.
      """
      if type == "user":
          cfgParser = self.userCfg["highlight"]
      elif type == "default":
          cfgParser = self.defaultCfg["highlight"]
      else:
          raise InvalidTheme("Invalid theme type specified")
      # Provide foreground and background colors for each theme
      # element (other than cursor) even though some values are not
      # yet used by idle, to allow for their use in the future.
      # Default values are generally black and white.
      # TODO copy theme from a class attribute.
      theme = {
          "normal-foreground": "#000000",
          "normal-background": "#ffffff",
          "keyword-foreground": "#000000",
          "keyword-background": "#ffffff",
          "builtin-foreground": "#000000",
          "builtin-background": "#ffffff",
          "comment-foreground": "#000000",
          "comment-background": "#ffffff",
          "string-foreground": "#000000",
          "string-background": "#ffffff",
          "definition-foreground": "#000000",
          "definition-background": "#ffffff",
          "hilite-foreground": "#000000",
          "hilite-background": "gray",
          "break-foreground": "#ffffff",
          "break-background": "#000000",
          "hit-foreground": "#ffffff",
          "hit-background": "#000000",
          "error-foreground": "#ffffff",
          "error-background": "#000000",
          # cursor (only foreground can be set)
          "cursor-foreground": "#000000",
          # shell window
          "stdout-foreground": "#000000",
          "stdout-background": "#ffffff",
          "stderr-foreground": "#000000",
          "stderr-background": "#ffffff",
          "console-foreground": "#000000",
          "console-background": "#ffffff",
      }
      for element in theme:
          if not cfgParser.has_option(themeName, element):
              # Print warning that will return a default color
              warning = (
                  "\n Warning: configHandler.IdleConf.GetThemeDict"
                  " -\n problem retrieving theme element %r"
                  "\n from theme %r.\n"
                  " returning default color: %r"
                  % (element, themeName, theme[element])
              )
              try:
                  print(warning, file=sys.stderr)
              except IOError:
                  pass
          theme[element] = cfgParser.Get(
              themeName, element, default=theme[element]
          )
      return theme
  
imports: from __future__ import print_function
  import os
  import sys
  from ConfigParser import ConfigParser
  from Tkinter import TkVersion
  from tkFont import Font, nametofont
label_desc: Use image node_id 8 for calling the IdleConf obj's underlying member method code with example usage: obj.GetThemeDict(type, themeName) and returns: theme