#NEWLINE# def get_caller_src( ) : #NEWLINE# #INDENT# skip = frozenset ( [ ( '_abcoll' , 'setdefault' ) , ( '_abcoll' , 'update' ) , ( 'ploy.config' , '__init__' ) , ( 'ploy.proxy' , '__setitem__' ) ] ) #NEWLINE# stop = frozenset ( [ ( 'ploy.proxy' , '__init__' ) , ( 'ploy.proxy' , '_proxied_instance' ) ] ) #NEWLINE# frame = sys . _getframe ( 2 ) #NEWLINE# while ( frame . f_back is not None ) : #NEWLINE# #INDENT# f_code = frame . f_code #NEWLINE# lineno = frame . f_lineno #NEWLINE# module_globals = frame . f_globals #NEWLINE# frame = frame . f_back #NEWLINE# module_name = ( module_globals . get ( '__name__' ) or '__main__' ) #NEWLINE# if ( ( module_name , f_code . co_name ) in skip ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( ( module_name , f_code . co_name ) in stop ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# package_name = get_package_name ( sys . modules [ module_name ] ) #NEWLINE# f = getattr ( sys . modules [ package_name ] , '__file__' , '' ) #NEWLINE# path = os . path . relpath ( f_code . co_filename , os . path . dirname ( f ) ) #NEWLINE# return ( '%s:%s:%s' % ( stop , path , lineno ) ) #NEWLINE# #UNINDENT# sys . exit ( 0 )