Cheetah.SourceReader module — Cheetah3 - The Python-Powered Template Engine

# Cheetah.SourceReader module

SourceReader class for Cheetah’s Parser and CodeGenerator

`Cheetah.SourceReader.` `ENCODINGsearch`()

  search(string[, pos[, endpos]]) -> match object or None. Scan through string looking for a match, and return a corresponding match object instance. Return None if no position in the string matches.

exception `Cheetah.SourceReader.` `Error`

  Bases: `Exception`

class `Cheetah.SourceReader.` `SourceReader`(src, filename=None, breakPoint=None, encoding=None)

  Bases: `object`

  `advance`(offset=1)
  `atEnd`()
  `atStart`()
  `breakPoint`()
  `checkPos`(pos)
  `filename`()
  `find`(it, pos=None)
  `findBOL`(pos=None)
  `findEOL`(pos=None, gobble=False)
  `getLine`(pos)
  `getNonWhiteSpace`(WSchars=' \x0c\t\n\r')
  `getRowCol`(pos=None)
  `getRowColLine`(pos=None)
  `getWhiteSpace`(max=None, WSchars=' \x0c\t')
  `getc`()
  `gotoBookmark`(name)
  `hasBookmark`(name)
  `isLineClearToPos`(pos=None)
  `lineNum`(pos=None)
  `matchNonWhiteSpace`(WSchars=' \x0c\t\n\r')
  `matchWhiteSpace`(WSchars=' \x0c\t')
  `matches`(strOrRE)
  `peek`(offset=0)
  `pos`()
  `read`(offset)
  `readTo`(to, start=None)
  `readToEOL`(start=None, gobble=True)
  `rev`(offset=1)
  `rfind`(it, pos)
  `setBookmark`(name)
  `setBreakPoint`(pos)
  `setPos`(pos)
  `splitlines`()
  `src`()
  `startswith`(it, pos=None)
  `ungetc`(c=None)
  `validPos`(pos)