#NEWLINE# def getsource( obj , index_path = None ) : #NEWLINE# #INDENT# if ( not isinstance ( obj , CInspectObject ) ) : #NEWLINE# #INDENT# obj = get_cinspect_object ( obj ) #NEWLINE# #UNINDENT# if isinstance ( obj , PythonObject ) : #NEWLINE# #INDENT# with inspect_restored ( ) : #NEWLINE# #INDENT# source = inspect . getsource ( obj . obj ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# source = Reader ( index_path ) . get_source ( obj ) #NEWLINE# #UNINDENT# return source