parameters: (self,  origin=None, relativize=True, **kw)
return_statement: return s.getvalue()[:-1]
docstring: Convert the message to text.
  
          The I{origin}, I{relativize}, and any other keyword
          arguments are passed to the rrset to_wire() method.
  
          @rtype: string
docstring_summary: Convert the message to text.
docstring_tokens: Convert the message to text .
function: def to_text(self,  origin=None, relativize=True, **kw):
          """Convert the message to text.
  
          The I{origin}, I{relativize}, and any other keyword
          arguments are passed to the rrset to_wire() method.
  
          @rtype: string
          """
  
          s = cStringIO.StringIO()
          print >> s, 'id %d' % self.id
          print >> s, 'opcode %s' % \
                dns.opcode.to_text(dns.opcode.from_flags(self.flags))
          rc = dns.rcode.from_flags(self.flags, self.ednsflags)
          print >> s, 'rcode %s' % dns.rcode.to_text(rc)
          print >> s, 'flags %s' % dns.flags.to_text(self.flags)
          if self.edns >= 0:
              print >> s, 'edns %s' % self.edns
              if self.ednsflags != 0:
                  print >> s, 'eflags %s' % \
                        dns.flags.edns_to_text(self.ednsflags)
              print >> s, 'payload', self.payload
          is_update = dns.opcode.is_update(self.flags)
          if is_update:
              print >> s, ';ZONE'
          else:
              print >> s, ';QUESTION'
          for rrset in self.question:
              print >> s, rrset.to_text(origin, relativize, **kw)
          if is_update:
              print >> s, ';PREREQ'
          else:
              print >> s, ';ANSWER'
          for rrset in self.answer:
              print >> s, rrset.to_text(origin, relativize, **kw)
          if is_update:
              print >> s, ';UPDATE'
          else:
              print >> s, ';AUTHORITY'
          for rrset in self.authority:
              print >> s, rrset.to_text(origin, relativize, **kw)
          print >> s, ';ADDITIONAL'
          for rrset in self.additional:
              print >> s, rrset.to_text(origin, relativize, **kw)
          #
          # We strip off the final \n so the caller can print the result without
          # doing weird things to get around eccentricities in Python print
          # formatting
          #
          return s.getvalue()[:-1]
function_tokens: def to_text ( self , origin = None , relativize = True , * * kw ) : s = cStringIO . StringIO ( ) print >> s , 'id %d' % self . id print >> s , 'opcode %s' % dns . opcode . to_text ( dns . opcode . from_flags ( self . flags ) ) rc = dns . rcode . from_flags ( self . flags , self . ednsflags ) print >> s , 'rcode %s' % dns . rcode . to_text ( rc ) print >> s , 'flags %s' % dns . flags . to_text ( self . flags ) if self . edns >= 0 : print >> s , 'edns %s' % self . edns if self . ednsflags != 0 : print >> s , 'eflags %s' % dns . flags . edns_to_text ( self . ednsflags ) print >> s , 'payload' , self . payload is_update = dns . opcode . is_update ( self . flags ) if is_update : print >> s , ';ZONE' else : print >> s , ';QUESTION' for rrset in self . question : print >> s , rrset . to_text ( origin , relativize , * * kw ) if is_update : print >> s , ';PREREQ' else : print >> s , ';ANSWER' for rrset in self . answer : print >> s , rrset . to_text ( origin , relativize , * * kw ) if is_update : print >> s , ';UPDATE' else : print >> s , ';AUTHORITY' for rrset in self . authority : print >> s , rrset . to_text ( origin , relativize , * * kw ) print >> s , ';ADDITIONAL' for rrset in self . additional : print >> s , rrset . to_text ( origin , relativize , * * kw ) # # We strip off the final \n so the caller can print the result without # doing weird things to get around eccentricities in Python print # formatting # return s . getvalue ( ) [ : - 1 ]