I am (for some elaborate setup reasons) trying to retrieve the actual "command" callback function from TKinter widgets, for example setting up a callback for a button "b"
import tkinter as tk root = tk.Tk() b = tk.Button(root, text='btn', command=lambda:print('foo'))
will only return a string like "2277504761920<lambda>" and not the actual command function. Is there a way to get the actual callback function?
Source: Python Questions