class Main(): def util(self): function_name = sys._getframe().f_code.co_name class_name = self.__class__.__name__ print('{}.{}'.format(function_name, class_name))