#NEWLINE# def get_details( var ) : #NEWLINE# #INDENT# '\n    Given a variable inside the context, obtain the attributes/callables,\n    their values where possible, and the module name and class name if possible\n    ' #NEWLINE# var_data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# module = getattr ( var , '__module__' , '' ) #NEWLINE# kls = getattr ( getattr ( var , '__class__' , '' ) , '__name__' , '' ) #NEWLINE# if module : #NEWLINE# #INDENT# var_data [ 'META_module_name' ] = module #NEWLINE# #UNINDENT# if kls : #NEWLINE# #INDENT# var_data [ 'META_class_name' ] = kls #NEWLINE# #UNINDENT# for attr in get_attributes ( var ) : #NEWLINE# #INDENT# value = _get_detail_value ( var , attr ) #NEWLINE# if ( value is not None ) : #NEWLINE# #INDENT# var_data [ attr ] = value #NEWLINE# #UNINDENT# #UNINDENT# return var_data