MCPcopy Create free account
hub / github.com/ipython/ipython / seek

Method seek

IPython/lib/demo.py:360–369  ·  view source on GitHub ↗

Move the current seek pointer to the given block. You can use negative indices to seek from the end, with identical semantics to those of Python lists.

(self,index)

Source from the content-addressed store, hash-verified

358 return index
359
360 def seek(self,index):
361 """Move the current seek pointer to the given block.
362
363 You can use negative indices to seek from the end, with identical
364 semantics to those of Python lists."""
365 if index<0:
366 index = self.nblocks + index
367 self._validate_index(index)
368 self.block_index = index
369 self.finished = False
370
371 def back(self,num=1):
372 """Move the seek pointer back num blocks (default is 1)."""

Callers 10

backMethod · 0.95
jumpMethod · 0.95
retar.pyFile · 0.80
_inner_call_Method · 0.80
source_to_unicodeFunction · 0.80
test_parse_sampleFunction · 0.80
check_cpasteFunction · 0.80
clear_coutMethod · 0.80
process_inputMethod · 0.80
reset_bufferMethod · 0.80

Calls 1

_validate_indexMethod · 0.95

Tested by 3

test_parse_sampleFunction · 0.64
check_cpasteFunction · 0.64
reset_bufferMethod · 0.64