I was studying textlib.py for some solution I need, and I found the function isDisabled(). This has a really ingenious solution, so I would like to offer the Beauty Award to the author whoever he was. :-)
Btw, is someone living here? Sometimes I ask something, and as if I threw my letter into the well instead of the mailbox...