Suppose I will send self.f to a global method,
def write_to_report(file_hdlr, content):
If I want get the what the object is the file_hdlr belonged to.
How to get it ? Because I need to know the file_hanlder is belonging which Class, and use the class name to do somthing
def write_to_report(file_hdlr, content):
file_hdlr.__self__ # ??? NO
CODE
class MemoryInfo(threading.Thread):
def __init__(self, config):
self.f = get_export_file_hdlr(self.__class__.__name__)
class CPUInfo(threading.Thread):
def __init__(self, config):
self.f = get_export_file_hdlr(self.__class__.__name__)