def Print(*args):
func_name = "[" + sys._getframe(1).f_code.co_name + "] "
for value in args:
if type(value) is str:
func_name = func_name + value
else:
func_name = func_name + str(value)
print(func_name)
Based on where the current syntax is running,
Function called with current syntax :
sys._getframe(0).f_code.co_name
Function with current syntax :
sys._getframe(1).f_code.co_name
#Python #PyQt #Python print #function #function Name
No comments:
Post a Comment