Print available (widget) attributes

How can I programmatically print all attributes available for each widget? Let’s say I don’t want to configure widgets by configuration or other methods but use possible widget attributes. I can see, for example, which attributes are available in /tkinter/ in the multi-line comment, but how do I get the list programmatically?

Take a look at the built-in function dir.

[…] With an argument, attempt to return a list of valid attributes for that object.
Built-in Functions — Python 3.12.2 documentation

Well, I had a look allready, but I have dunder methods in the output too. How they translates to widget atributes?

Take a look at Datamodels - Special Method Names and look at the description of the special (dunder) methods. This should provide a general description of what they do.

Not sure to be honest. But for tkinter, here is a website that describes the attributes fairly well: