Esempio n. 1
0
 def __str__( self ):
     " Converts to string "
     return "CML record: " + Fragment.__str__( self ) + \
            "\nBody:\n" + "\n".join( [ str( item ) for item in self.parts ] )
Esempio n. 2
0
 def niceStringify( self, level ):
     " Returns a string representation with new lines and shifts "
     joiner = "\n" + ( level + 1 ) * "    "
     return level * "    " + "CML record: " + Fragment.__str__( self ) + \
            joiner + joiner.join( [ str( item ) for item in self.parts ] )