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 extensions in default and user config-extensions files.
  
  If active_only True, only return active (enabled) extensions
  and optionally only editor or shell extensions.
  If active_only False, return all extensions.
code: def GetExtensions(
      self, active_only=True, editor_only=False, shell_only=False
  ):
      """Return extensions in default and user config-extensions files.
  
      If active_only True, only return active (enabled) extensions
      and optionally only editor or shell extensions.
      If active_only False, return all extensions.
      """
      extns = self.RemoveKeyBindNames(
          self.GetSectionList("default", "extensions")
      )
      userExtns = self.RemoveKeyBindNames(
          self.GetSectionList("user", "extensions")
      )
      for extn in userExtns:
          if extn not in extns:  # user has added own extension
              extns.append(extn)
      if active_only:
          activeExtns = []
          for extn in extns:
              if self.GetOption(
                  "extensions",
                  extn,
                  "enable",
                  default=True,
                  type="bool",
              ):
                  # the extension is enabled
                  if (
                      editor_only or shell_only
                  ):  # TODO if both, contradictory
                      if editor_only:
                          option = "enable_editor"
                      else:
                          option = "enable_shell"
                      if self.GetOption(
                          "extensions",
                          extn,
                          option,
                          default=True,
                          type="bool",
                          warn_on_default=False,
                      ):
                          activeExtns.append(extn)
                  else:
                      activeExtns.append(extn)
          return activeExtns
      else:
          return extns
  
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 11 for calling the IdleConf obj's underlying member method code with example usage: obj.GetExtensions(active_only, editor_only, shell_only) and returns: activeExtns, extns