Changeset 1459 for trunk/peppy/plugins/error_log.py
- Timestamp:
- 07/06/08 16:09:42 (5 months ago)
- Files:
-
- 1 modified
-
trunk/peppy/plugins/error_log.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/peppy/plugins/error_log.py
r1451 r1459 21 21 BoolParam('show', False), 22 22 BoolParam('always_scroll', False), 23 StrParam('filename_match_regex', " File \"(.+)\", line ([0-9]+)", 'Regular expression used to match pathnames in the output'),23 StrParam('filename_match_regex', "^ File \"(.+)\", line ([0-9]+)", 'Regular expression used to match pathnames in the output'), 24 24 ) 25 25 … … 32 32 33 33 self.filere = re.compile(self.classprefs.filename_match_regex) 34 self.stdre = re.compile("^((?:[a-zA-Z]:)?.+):([0-9]+):") 34 35 35 36 def addMessage(self, text): … … 57 58 self.scanForFilenames() 58 59 60 def matchLine(self, text, i=0): 61 match = self.filere.search(text, i) 62 if match: 63 return match 64 match = self.stdre.search(text, i) 65 if match: 66 return match 67 return None 68 59 69 def scanForFilenames(self): 60 70 if not hasattr(self, 'last_matched_filename'): … … 67 77 i = 0 68 78 while i < len(text): 69 match = self. filere.search(text, i)79 match = self.matchLine(text, i) 70 80 if not match: 71 81 break … … 87 97 text = self.GetLine(line) 88 98 #dprint("text=%s" % text) 89 match = self. filere.search(text)99 match = self.matchLine(text) 90 100 if match: 91 101 filename = match.group(1)
