• Home
  • Raw
  • Download

Lines Matching refs:lines

374         lines = string.split(string.expandtabs(doc), '\n')
380 for line in lines[1:]:
386 if lines:
387 lines[0] = lines[0].lstrip()
389 for i in range(1, len(lines)): lines[i] = lines[i][margin:]
391 while lines and not lines[-1]:
392 lines.pop()
393 while lines and not lines[0]:
394 lines.pop(0)
395 return string.join(lines, '\n')
533 lines = linecache.getlines(file, module.__dict__)
535 lines = linecache.getlines(file)
536 if not lines:
540 return lines, 0
549 for i in range(len(lines)):
550 match = pat.match(lines[i])
553 if lines[i][0] == 'c':
554 return lines, i
561 return lines, candidates[0][1]
579 if pat.match(lines[lnum]): break
581 return lines, lnum
590 lines, lnum = findsource(object)
597 if lines and lines[0][:2] == '#!': start = 1
598 while start < len(lines) and string.strip(lines[start]) in ('', '#'):
600 if start < len(lines) and lines[start][:1] == '#':
603 while end < len(lines) and lines[end][:1] == '#':
604 comments.append(string.expandtabs(lines[end]))
610 indent = indentsize(lines[lnum])
612 if end >= 0 and string.lstrip(lines[end])[:1] == '#' and \
613 indentsize(lines[end]) == indent:
614 comments = [string.lstrip(string.expandtabs(lines[end]))]
617 comment = string.lstrip(string.expandtabs(lines[end]))
618 while comment[:1] == '#' and indentsize(lines[end]) == indent:
622 comment = string.lstrip(string.expandtabs(lines[end]))
672 def getblock(lines): argument
676 tokenize.tokenize(iter(lines).next, blockfinder.tokeneater)
679 return lines[:blockfinder.last]
689 lines, lnum = findsource(object)
691 if ismodule(object): return lines, 0
692 else: return getblock(lines[lnum:]), lnum + 1
700 lines, lnum = getsourcelines(object)
701 return string.join(lines, '')
1012 lines, lnum = findsource(frame)
1014 lines = index = None
1017 start = max(0, min(start, len(lines) - context))
1018 lines = lines[start:start+context]
1021 lines = index = None
1023 return Traceback(filename, lineno, frame.f_code.co_name, lines, index)