aboutsummaryrefslogtreecommitdiffstats
path: root/epy.py
diff options
context:
space:
mode:
authorBenawi Adha <benawiadha@gmail.com>2022-09-24 19:44:00 +0700
committerBenawi Adha <benawiadha@gmail.com>2022-09-24 19:44:00 +0700
commitd43533f01d9d5baf5f78b71f832641382bd5962a (patch)
tree44dc22bea852f1c214c367c3013c348844db9a26 /epy.py
parent3d6cc576607dd523195e5e8444612079645bb274 (diff)
downloadepy-d43533f01d9d5baf5f78b71f832641382bd5962a.tar.gz
Setup debugger: debugpy
Diffstat (limited to 'epy.py')
-rwxr-xr-xepy.py24
1 files changed, 1 insertions, 23 deletions
diff --git a/epy.py b/epy.py
index d73389d..6e72cf3 100755
--- a/epy.py
+++ b/epy.py
@@ -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()