MCPcopy Index your code
hub / github.com/clips/pattern / seek

Method seek

pattern/web/pdf/psparser.py:175–190  ·  view source on GitHub ↗

Seeks the parser to the given position.

(self, pos)

Source from the content-addressed store, hash-verified

173 return
174
175 def seek(self, pos):
176 """Seeks the parser to the given position.
177 """
178 if 2 <= self.debug:
179 print >>sys.stderr, 'seek: %r' % pos
180 self.fp.seek(pos)
181 # reset the status for nextline()
182 self.bufpos = pos
183 self.buf = ''
184 self.charpos = 0
185 # reset the status for nexttoken()
186 self._parse1 = self._parse_main
187 self._curtoken = ''
188 self._curtokenpos = 0
189 self._tokens = []
190 return
191
192 def fillbuf(self):
193 if self.charpos < len(self.buf): return

Callers 15

__init__Method · 0.95
loadMethod · 0.45
load_fallbackMethod · 0.45
getobjMethod · 0.45
do_keywordMethod · 0.45
read_xref_fromMethod · 0.45
pollMethod · 0.45
revreadlinesMethod · 0.45
seekMethod · 0.45
__init__Method · 0.45
__getitem__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected