I'm learning python. I'm at a point where I need to have the option to tell if a particular character is either A_BOLD, A_DIM or A_REVERSE and so forth So I could in the end change its attribute as needs be (using for instance window.chgat(attr)).
In any case, I don't have a clue how to recover this data.
As per the documentation:
window.inch([y, x])¶
Return the character at the given position in the window. The bottom 8 bits are the character proper, and upper bits are the attributes.
I comprehend that the data about the character attribute is fused inside the outcome from inch and actually, printing the character acquired showcases it with its attributes also.
However, Im not familiar enough in PC address see how to utilize this. How would I get and decipher/interpret those upper bit?... How would it be a good idea for me to respond, say, to check if the character is imprinted in bold or not?