The window.inch(([y, x])) function returns the character and attributes of
the character at the current or specified window position.  But how does one
separate the foreground and background colors from the resulting value?

colors = window.inch(0.0) & A_ATTRIBUTES

That should return the combined color + attributes value, but how to
separate the foreground and background color values from that result?
Should the following reliably work?

fg, bg = curses.pair_content (curses.pair_number(window.inch(0,0) &
A_ATTRIBUTES))

Peter


-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to