def _find_next_eol(output, ind):
'Find last newline before current position.'
# find first eol after expr. evaluation
inext = ind + 1
while inext < len(output):
eolnext = output[inext].find('\n')
if eolnext != -1:
break
inext += 1
else:
inext = len(output) - 1
eolnext = len(output[-1]) - 1
return inext, eolnext
评论列表
文章目录