class_docstr: Class to manipulate the TextGrid format used by Praat.
  Separates each tier within this file into its own Tier
  object.  Each TextGrid object has
  a number of tiers (size), xmin, xmax, a text type to help
  with the different styles of TextGrid format, and tiers with their
  own attributes.
class_docstr_tok: ["Class","to","manipulate","the","TextGrid","format","used","by","Praat",".","Separates","each","tier","within","this","file","into","its","own","Tier","object",".","Each","TextGrid","object","has","a","number","of","tiers","(","size",")",",","xmin",",","xmax",",","a","text","type","to","help","with","the","different","styles","of","TextGrid","format",",","and","tiers","with","their","own","attributes","."]
docstr: @return:  A string in OoTextGrid file format.
docstr_tok: ["@","return",":","A","string","in","OoTextGrid","file","format","."]
code: def to_oo(self):
      """
      @return:  A string in OoTextGrid file format.
      """
  
      oo_file = ""
      oo_file += 'File type = "ooTextFile"\n'
      oo_file += 'Object class = "TextGrid"\n\n'
      oo_file += "xmin = ", self.xmin, "\n"
      oo_file += "xmax = ", self.xmax, "\n"
      oo_file += "tiers? <exists>\n"
      oo_file += "size = ", self.size, "\n"
      oo_file += "item []:\n"
      for i in range(len(self.tiers)):
          oo_file += "%4s%s [%s]" % ("", "item", i + 1)
          _curr_tier = self.tiers[i]
          for x, y in _curr_tier.header:
              oo_file += '%8s%s = "%s"' % ("", x, y)
          if _curr_tier.classid != TEXTTIER:
              for xmin, xmax, text in _curr_tier.simple_transcript:
                  oo_file += "%12s%s = %s" % ("", "xmin", xmin)
                  oo_file += "%12s%s = %s" % ("", "xmax", xmax)
                  oo_file += '%12s%s = "%s"' % ("", "text", text)
          else:
              for time, mark in _curr_tier.simple_transcript:
                  oo_file += "%12s%s = %s" % ("", "time", time)
                  oo_file += "%12s%s = %s" % ("", "mark", mark)
      return oo_file
  
imports: import sys
  import re
label_desc: Use image node_id 9 for calling the TextGrid obj's underlying member method code with example usage: obj.to_oo() and returns: oo_file