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

Function get_pager_start

IPython/core/page.py:305–318  ·  view source on GitHub ↗

Return the string for paging files with an offset. This is the '+N' argument which less and more (under Unix) accept.

(pager, start)

Source from the content-addressed store, hash-verified

303
304
305def get_pager_start(pager, start):
306 """Return the string for paging files with an offset.
307
308 This is the '+N' argument which less and more (under Unix) accept.
309 """
310
311 if pager in ['less','more']:
312 if start:
313 start_string = '+' + str(start)
314 else:
315 start_string = ''
316 else:
317 start_string = ''
318 return start_string
319
320
321# (X)emacs on win32 doesn't like to be bypassed with msvcrt.getch()

Callers 2

pager_pageFunction · 0.85
page_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected