#NEWLINE# def getsourcelines( object ) : #NEWLINE# #INDENT# 'Return a list of source lines and starting line number for an object.\n\n    The argument may be a module, class, method, function, traceback, frame,\n    or code object.  The source code is returned as a list of the lines\n    corresponding to the object and the line number indicates where in the\n    original source file the first line of code was found.  An IOError is\n    raised if the source code cannot be retrieved.' #NEWLINE# ( lines , lnum ) = findsource ( lines ) #NEWLINE# if ismodule ( object ) : #NEWLINE# #INDENT# return ( lines , 0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( getblock ( lines [ lnum : ] ) , ( lnum + 1 ) )