[py-svn] r33016 - py/dist/py/code

simonb at codespeak.net simonb at codespeak.net
Sun Oct 8 22:00:25 CEST 2006


Author: simonb
Date: Sun Oct  8 22:00:12 2006
New Revision: 33016

Modified:
   py/dist/py/code/traceback2.py
Log:
added getfirstlinesource method to TracebackEntry class 

Modified: py/dist/py/code/traceback2.py
==============================================================================
--- py/dist/py/code/traceback2.py	(original)
+++ py/dist/py/code/traceback2.py	Sun Oct  8 22:00:12 2006
@@ -52,6 +52,10 @@
                 break 
         return source[start:end]
 
+    def getfirstlinesource(self):
+        start = self.frame.code.firstlineno
+        return start
+
     def ishidden(self):
         try: 
             return self.frame.eval("__tracebackhide__") 


More information about the py-svn mailing list