Created
February 16, 2019 09:12
-
-
Save devforfu/cba04672d444eea26206fa45df4087f3 to your computer and use it in GitHub Desktop.
An illustration of the debugging issues when using curses
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import curses | |
def main(term): | |
term.clear() | |
for i in range(10): | |
# try to debug after curses mangled the terminal | |
breakpoint() | |
term.addstr(i, 0, f'String: {i + 1:d}') | |
term.refresh() | |
term.getkey() | |
if __name__ == '__main__': | |
curses.wrapper(main) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment