Lines Matching refs:line
13 r'file "([^"]*)", line (\d+)',
24 "Compile the patterns for matching to file name and line number."
30 def file_line_helper(line):
31 """Extract file name and line number from line of text.
33 Check if line of text contains one of the file/line patterns.
34 If it does and if the file and line are valid, return
35 a tuple of the file name and line number. If it doesn't match
36 or if the file or line is invalid, return None.
41 match = prog.search(line)
64 Adds binding to open a file at a line to the text widget.
73 ("Go to file/line", "<<goto-file-line>>", None),
80 self.text.bind("<<goto-file-line>>", self.goto_file_line)
102 line as it is added.
120 for line in lines:
121 self.write(line)
131 """Handle request to open file/line.
133 If the selected or previous line in the output window
134 contains a file name and line number, then open that file
135 name in a new window and position on the line number.
139 line = self.text.get("insert linestart", "insert lineend")
140 result = file_line_helper(line)
142 # Try the previous line. This is handy e.g. in tracebacks,
143 # where you tend to right-click on the displayed source line
144 line = self.text.get("insert -1line linestart",
145 "insert -1line lineend")
146 result = file_line_helper(line)
149 "No special line",
150 "The line you point at doesn't look like "
151 "a valid file name followed by a line number.",