diff options
author | Benawi Adha <benawiadha@gmail.com> | 2022-09-24 19:44:00 +0700 |
---|---|---|
committer | Benawi Adha <benawiadha@gmail.com> | 2022-09-24 19:44:00 +0700 |
commit | d43533f01d9d5baf5f78b71f832641382bd5962a (patch) | |
tree | 44dc22bea852f1c214c367c3013c348844db9a26 /epy.py | |
parent | 3d6cc576607dd523195e5e8444612079645bb274 (diff) | |
download | epy-d43533f01d9d5baf5f78b71f832641382bd5962a.tar.gz |
Setup debugger: debugpy
Diffstat (limited to 'epy.py')
-rwxr-xr-x | epy.py | 24 |
1 files changed, 1 insertions, 23 deletions
@@ -23,7 +23,7 @@ examples: """ -__version__ = "2022.4.18" +__version__ = "2022.9.24" __license__ = "GPL-3.0" __author__ = "Benawi Adha" __email__ = "benawiadha@gmail.com" @@ -82,26 +82,7 @@ except ModuleNotFoundError: try: # Debug swith # $ DEBUG=1 ./epy.py - DEBUG = int(str(os.getenv("DEBUG"))) == 1 - STDSCR = None - - def debug(context: int = 5) -> None: - # if not isinstance(STDSCR, curses.window): - # raise RuntimeError("STDSCR not set") - if STDSCR: - curses.nocbreak() - STDSCR.keypad(False) # type: ignore - curses.echo() - curses.endwin() - - try: - import ipdb # type: ignore - - ipdb.set_trace(context=context) - except ModuleNotFoundError: - breakpoint() - except ValueError: DEBUG = False @@ -3853,9 +3834,6 @@ class Reader: def preread(stdscr, filepath: str): - global STDSCR - if DEBUG: - STDSCR = stdscr ebook = get_ebook_obj(filepath) state = State() |