def write(self, orderlist = None):
        """Takes the members of the config stored in this ConfigObj and returns them as a list.
        The order can be fixed using an iterator or sequence passed in.
        Comments in the config are preserved in the output list.
        If orderlist is present it will be iterated over and as valid keys for the config are
        found they will be used in that order.
        Extra values not in config but in orderlist are ignored.
        Any keywords in config but not in orderlist will be written out in whatever order they are produced from config !
        Any values in config that are of value None (weren't read in from the original file)
        *will* be output in the list - keywords specified in object.configspec as a single value type
        will be given the default value ''
        Multiple types will be given the default value []"""
        
        configkeys = self.config.keys()
        outorder = []
        if orderlist:
            for member in orderlist:
                outorder.append(member.lower())
        outconfig = []
        for member in outorder:
            if member in configkeys:
                configkeys.remove(member)
                if member.find("'") == -1:
                    outline = "'" + member + "'" + '    :    '
                elif member.find('"') == -1:
                    outline = '"' + member + '"' + '    :    '
                else:
                    outline = member + '    :    '
                if self.configspec[member] == '[]':
                    outline += '['
                    if not self.config[member]:
                        outline += ']'
                    else:
                        for item in self.config[member]['value']:
                            if item.find("'") == -1:
                                outline += "'" + item + "'" + ', '
                            elif item.find('"') == -1:
                                outline += '"' + item + '"' + ', '
                            else:
                                outline += item + ', '
                        outline = outline[:-1]
                        outline += ']'
                else:
                    if not self.config[member]:
                        outline += "''"
                    else:
                        if self.config[member]['value'].find("'") == -1:
                            outline += "'" + self.config[member]['value'] + "'"
                        elif self.config[member]['value'].find('"') == -1:
                            outline += '"' + self.config[member]['value'] + '"'
                        else:
                            outline += self.config[member]['value']
                if self.config[member]and self.config[member]['comment'] != '':
                    outline += '    ' + self.config[member]['comment']
                    
                outconfig.append(outline)
                
        for member in configkeys:
            if member.find("'") == -1:
                outline = "'" + member + "'" + '    :    '
            elif member.find('"') == -1:
                outline = '"' + member + '"' + '    :    '
            else:
                outline = member + '    :    '
            if self.configspec[member] == '[]':
                outline += '['
                if not self.config[member]:
                    outline += ']'
                else:
                    for item in self.config[member]['value']:
                        if item.find("'") == -1:
                            outline += "'" + item + "'" + ', '
                        elif item.find('"') == -1:
                            outline += '"' + item + '"' + ', '
                        else:
                            outline += item + ', '
                    outline = outline[:-1]
                    outline += ']'
            else:
                if not self.config[member]:
                    outline += "''"
                else:
                    if self.config[member]['value'].find("'") == -1:
                        outline += "'" + self.config[member]['value'] + "'"
                    elif self.config[member]['value'].find('"') == -1:
                        outline += '"' + self.config[member]['value'] + '"'
                    else:
                        outline += self.config[member]['value']
            if self.config[member]and self.config[member]['comment'] != '':
                outline += '    ' + self.config[member]['comment']
                
            outconfig.append(outline)
        return outconfig
Takes the members of the config stored in this ConfigObj and returns them as a list.
        The order can be fixed using an iterator or sequence passed in.
        Comments in the config are preserved in the output list.
        If orderlist is present it will be iterated over and as valid keys for the config are
        found they will be used in that order.
        Extra values not in config but in orderlist are ignored.
        Any keywords in config but not in orderlist will be written out in whatever order they are produced from config !
        Any values in config that are of value None (weren't read in from the original file)
        *will* be output in the list - keywords specified in object.configspec as a single value type
        will be given the default value ''
        Multiple types will be given the default value []
recipes/Python/259175_ConfigObj__Lightweight_Config_File/recipe-259175.py