def returnString(self, limit=False, omitBrackets=False, executable=False, honorMissing=False):
        '''Return a string containing the list of dictionaries in easy
        human-readable read format.

        Each entry is on one line. Key/value pairs are 'spaced' in such a way
        as to have them all line up vertically if using a monospace font. The
        fields are normalized to alphabetical order. Missing keys in a
        dictionary are inserted with a value of 'None' unless *honorMissing* is
        set to True.

        Example of use:

        >>> test = [
        ...    {"name": "Jim",   "age": 18, "income": 93000, "order": 2},
        ...    {"name": "Larry", "age": 18,                  "order": 3},
        ...    {"name": "Joe",   "age": 20, "income": 15000, "order": 1},
        ...    {"name": "Bill",  "age": 19, "income": 29000, "order": 4},
        ... ]
        >>> print PLOD(test).returnString()
        [
            {age: 18, income: 93000, name: 'Jim'  , order: 2},
            {age: 18, income: None , name: 'Larry', order: 3},
            {age: 20, income: 15000, name: 'Joe'  , order: 1},
            {age: 19, income: 29000, name: 'Bill' , order: 4}
        ]
        >>> print PLOD(test).returnString(limit=3, omitBrackets=True, executable=True)
        {'age': 18, 'income': 93000, 'name': 'Jim'  , 'order': 2},
        {'age': 18, 'income': None , 'name': 'Larry', 'order': 3},
        {'age': 20, 'income': 15000, 'name': 'Joe'  , 'order': 1}
        >>> print PLOD(test).returnString(honorMissing=True)
        [
            {age: 18, income: 93000, name: 'Jim'  , order: 2},
            {age: 18,                name: 'Larry', order: 3},
            {age: 20, income: 15000, name: 'Joe'  , order: 1},
            {age: 19, income: 29000, name: 'Bill' , order: 4}
        ]
        
        :param limit:
           A number limiting the quantity of entries to return. Defaults to
           False, which means that the full list is returned.
        :param omitBrackets:
           If set to True, the outer square brackets representing the entire
           list are omitted. Defaults to False.
        :param executable:
           If set to True, the string is formatted in such a way that it
           conforms to Python syntax. Defaults to False.
        :param honorMissing:
           If set to True, keys that are missing in a dictionary are simply
           skipped with spaces. If False, then the key is display and given
           a value of None. Defaults to False.
        :return:
           A string containing a formatted textual representation of the list
           of dictionaries.
        '''
        result = ""
        # we limit the table if needed
        if not limit:
            limit = len(self.table)
        used_table = []
        for i in range(limit):
            if len(self.table)>i:
                used_table.append(internal.convert_to_dict(self.table[i]))
        # we locate all of the attributes and their lengths
        attr_width = {}
        # first pass to get the keys themselves
        for row in used_table:
            for key in row:
                if not key in attr_width:
                    attr_width[key] = 0
        # get a sorted list of keys
        attr_order = attr_width.keys()
        attr_order.sort()
        # not get minimum widths
        #  (this is done as a seperate step to account for 'None' and other conditions.
        for row in used_table:
            for key in attr_width:
                if not key in row:
                    if not honorMissing:
                        if attr_width[key] < len("None"):
                            attr_width[key] = len("None")
                else:
                    if len(repr(row[key])) > attr_width[key]:
                        attr_width[key] = len(repr(row[key]))
        # now we do the pretty print
        if not omitBrackets:
            result += "[\n"
        body = []
        for row in used_table:
            row_string = ""
            if not omitBrackets:
                row_string += "    "
            row_string += "{"
            middle = []
            for key in attr_order:
                if key in row:
                    # build the key
                    if executable:
                        item = "'"+str(key) + "': "
                    else:
                        item = str(key) + ": "
                    # build the value
                    s = repr(row[key])
                    if type(row[key]) is typemod.IntType:
                        s = s.rjust(attr_width[key])
                else:
                    if honorMissing:
                        # build the key
                        item = " "*len(str(key))
                        if executable:
                            item += "  "
                        item +=  "  "
                        # build the value
                        s=""
                    else:
                        # build the key
                        if executable:
                            item = "'"+str(key) + "': "
                        else:
                            item = str(key) + ": "
                        # build the value
                        s = "None"
                item += s.ljust(attr_width[key])
                middle.append(item)
            # row_string += ", ".join(middle)
            row_string += internal.special_join(middle)
            row_string += "}"
            body.append(row_string)
        result += ",\n".join(body)
        if len(body) and not omitBrackets:
            result += "\n"
        if not omitBrackets:
            result += "]"
        return result
def returnString ( self , limit = False , omitBrackets = False , executable = False , honorMissing = False ) : result = "" if not limit : limit = len ( self . table ) used_table = [ ] for i in range ( limit ) : if len ( self . table ) > i : used_table . append ( internal . convert_to_dict ( self . table [ i ] ) ) attr_width = { } for row in used_table : for key in row : if not key in attr_width : attr_width [ key ] = 0 attr_order = attr_width . keys ( ) attr_order . sort ( ) for row in used_table : for key in attr_width : if not key in row : if not honorMissing : if attr_width [ key ] < len ( "None" ) : attr_width [ key ] = len ( "None" ) else : if len ( repr ( row [ key ] ) ) > attr_width [ key ] : attr_width [ key ] = len ( repr ( row [ key ] ) ) if not omitBrackets : result += "[\n" body = [ ] for row in used_table : row_string = "" if not omitBrackets : row_string += "    " row_string += "{" middle = [ ] for key in attr_order : if key in row : if executable : item = "'" + str ( key ) + "': " else : item = str ( key ) + ": " s = repr ( row [ key ] ) if type ( row [ key ] ) is typemod . IntType : s = s . rjust ( attr_width [ key ] ) else : if honorMissing : item = " " * len ( str ( key ) ) if executable : item += "  " item += "  " s = "" else : if executable : item = "'" + str ( key ) + "': " else : item = str ( key ) + ": " s = "None" item += s . ljust ( attr_width [ key ] ) middle . append ( item ) row_string += internal . special_join ( middle ) row_string += "}" body . append ( row_string ) result += ",\n" . join ( body ) if len ( body ) and not omitBrackets : result += "\n" if not omitBrackets : result += "]" return result
Return a string containing the list of dictionaries in easy
        human-readable read format.

        Each entry is on one line. Key/value pairs are 'spaced' in such a way
        as to have them all line up vertically if using a monospace font. The
        fields are normalized to alphabetical order. Missing keys in a
        dictionary are inserted with a value of 'None' unless *honorMissing* is
        set to True.

        Example of use:

        >>> test = [
        ...    {"name": "Jim",   "age": 18, "income": 93000, "order": 2},
        ...    {"name": "Larry", "age": 18,                  "order": 3},
        ...    {"name": "Joe",   "age": 20, "income": 15000, "order": 1},
        ...    {"name": "Bill",  "age": 19, "income": 29000, "order": 4},
        ... ]
        >>> print PLOD(test).returnString()
        [
            {age: 18, income: 93000, name: 'Jim'  , order: 2},
            {age: 18, income: None , name: 'Larry', order: 3},
            {age: 20, income: 15000, name: 'Joe'  , order: 1},
            {age: 19, income: 29000, name: 'Bill' , order: 4}
        ]
        >>> print PLOD(test).returnString(limit=3, omitBrackets=True, executable=True)
        {'age': 18, 'income': 93000, 'name': 'Jim'  , 'order': 2},
        {'age': 18, 'income': None , 'name': 'Larry', 'order': 3},
        {'age': 20, 'income': 15000, 'name': 'Joe'  , 'order': 1}
        >>> print PLOD(test).returnString(honorMissing=True)
        [
            {age: 18, income: 93000, name: 'Jim'  , order: 2},
            {age: 18,                name: 'Larry', order: 3},
            {age: 20, income: 15000, name: 'Joe'  , order: 1},
            {age: 19, income: 29000, name: 'Bill' , order: 4}
        ]
        
        :param limit:
           A number limiting the quantity of entries to return. Defaults to
           False, which means that the full list is returned.
        :param omitBrackets:
           If set to True, the outer square brackets representing the entire
           list are omitted. Defaults to False.
        :param executable:
           If set to True, the string is formatted in such a way that it
           conforms to Python syntax. Defaults to False.
        :param honorMissing:
           If set to True, keys that are missing in a dictionary are simply
           skipped with spaces. If False, then the key is display and given
           a value of None. Defaults to False.
        :return:
           A string containing a formatted textual representation of the list
           of dictionaries.