Internal helper that wraps a Python callback so that it can be invoked from Tcl. func is the Python function, subst is an optional function that pre-processes the Tcl arguments, and widget is the widget used for error reporting. Instances are created automatically by Misc.register(); this class is not normally used directly.