+ global debug_mode
This commit is contained in:
@@ -8,7 +8,7 @@ import logging
|
||||
class gui:
|
||||
|
||||
def __init__(self, theme: str, debug_mode: bool):
|
||||
self.get_debug_mode(mode=debug_mode)
|
||||
self.debug_mode = debug_mode
|
||||
window = self.init_gui(theme=theme)
|
||||
self.show_gui(window=window)
|
||||
|
||||
@@ -19,6 +19,8 @@ class gui:
|
||||
logging.basicConfig(level=loging_level)
|
||||
|
||||
def init_gui(self, theme: str):
|
||||
self.get_debug_mode(self.debug_mode)
|
||||
|
||||
sg.theme(theme)
|
||||
logging.info(('Theme = ' + theme))
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@ import logging
|
||||
from draw.Iinstruction import Iinstruction
|
||||
from interpreter import interpret_source as itp
|
||||
from draw import code_to_image as cti
|
||||
# from gui.gui import
|
||||
from gui.gui import gui
|
||||
|
||||
|
||||
class NassiShneidermanDiagram:
|
||||
|
||||
def __init__(self, debug: bool=False) -> None:
|
||||
self.instructions: dict[str, Iinstruction] = {}
|
||||
self.init_logging(debug)
|
||||
self.init_logging(gui.debug_mode)
|
||||
|
||||
def init_logging(self, debug: bool):
|
||||
logLevel = logging.INFO
|
||||
|
||||
Reference in New Issue
Block a user