'Gets a list of all idle extensions declared in the config files.
active_only - boolean, if true only return active (enabled) extensions'

def GetExtensions(self, active_only=True, editor_only=False, shell_only=False):

    extns = self.RemoveKeyBindNames(self.GetSectionList('default', 'extensions'))
    userExtns = self.RemoveKeyBindNames(self.GetSectionList('user', 'extensions'))
    for extn in userExtns:
        if (extn not in extns):
            extns.append(extn)
    if active_only:
        activeExtns = []
        for extn in extns:
            if self.GetOption('extensions', extn, 'enable', default=True, type='bool'):
                if (editor_only or shell_only):
                    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
