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: Figures out the TextGrid format.
docstr_tok: ["Figures","out","the","TextGrid","format","."]
code: def _check_type(self):
      """
      Figures out the TextGrid format.
      """
  
      m = re.match("(.*)[\r\n](.*)[\r\n](.*)[\r\n](.*)", self.read_file)
      try:
          type_id = m.group(1).strip()
      except AttributeError:
          raise TypeError("Cannot read file -- try TextGrid.load()")
      xmin = m.group(4)
      if type_id == 'File type = "ooTextFile"':
          if "xmin" not in xmin:
              text_type = "OldooTextFile"
          else:
              text_type = "ooTextFile"
      elif type_id == '"Praat chronological TextGrid text file"':
          text_type = "ChronTextFile"
      else:
          raise TypeError("Unknown format '(%s)'", (type_id))
      return text_type
  
imports: import sys
  import re
label_desc: Use image node_id 6 for calling the TextGrid obj's underlying member method code with example usage: obj._check_type() and returns: text_type