Example #1
0
    def format(self):
        l = 80
        obj = self.getattrOnly(constants.OBJECT_KEY)

        result =  '\n#' + '='*(l-2) + '\n'
        result += '# %s\n' % obj
        result += '#' + '='*(l-2) + '\n\n'

        for key, value in self.iteritems():
            if value is not None:
                result += '#' + '-'*(l-2) + '\n'
                result += '# %s\n' % key
                result += '#' + '-'*(l-2) + '\n'
                result += io.formatDictItems(value,
                                             '{key:20} : {value!s}\n'
                                            )
            #end if
        #end for
        return result
Example #2
0
 def formatItems(self, fmt='{key:20} : {value!s}\n'):
     return io.formatDictItems(self, fmt)
Example #3
0
File: main.py Project: jakesyl/cing
def pfd( object ):
    print io.formatDictItems( object )