| 564 | return self.localtrace |
| 565 | |
| 566 | def localtrace_trace(self, frame, why, arg): |
| 567 | if why == "line": |
| 568 | # record the file name and line number of every trace |
| 569 | filename = frame.f_code.co_filename |
| 570 | lineno = frame.f_lineno |
| 571 | |
| 572 | if self.start_time: |
| 573 | print('%.2f' % (_time() - self.start_time), end=' ') |
| 574 | bname = os.path.basename(filename) |
| 575 | print("%s(%d): %s" % (bname, lineno, |
| 576 | linecache.getline(filename, lineno)), end='') |
| 577 | return self.localtrace |
| 578 | |
| 579 | def localtrace_count(self, frame, why, arg): |
| 580 | if why == "line": |