There are buttons for switching to object mode, edit mode, pose mode and others. How to make sure which of these modes is active using Blender's Python API? Any information would help! Preferably with at least a small example of two simple buttons. For example, layers I managed to do on. off. But layers are not suitable. I will be very glad to your tips. Thank you very much!
You can get the current activated mode with the following:
This will print things like
OBJECT, EDIT, WEIGHT_PAINT, POSE etc