Skip to content Skip to sidebar Skip to footer

Write An Utf8 Character To The Last Position Of The Screen With Python Curses

How to write a UTF8 character to the last position (bottom right) of the screen with Python's curses module? The task might look straight forward at first, but it isn't. First of a

Solution 1:

It's straightforward:

  • turn off scrolling using scrollok
  • move to the lower right corner
  • add the character with addch
  • catch (and ignore) an exception due to failed move past the lower-right corner.

ncurses does the necessary juggling with insertion...

Post a Comment for "Write An Utf8 Character To The Last Position Of The Screen With Python Curses"