Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.root.bind('', lambda e: self.root.destroy())
else:
self.root = tk.Tk()
self.root.bind('', self.quit_app)
self.root.protocol("WM_DELETE_WINDOW", self.quit_app)
self.root.title(title)
self.root.resizable(False, False)
self.set_icon()
self.root.grid_columnconfigure(0, weight=1)
self.root.grid_rowconfigure(0, weight=1)
self.NWES = (tk.N, tk.W, tk.E, tk.S)
self.WE = (tk.W, tk.E)
logo_ = os.path.join(config.CODEPATH, 'res', 'logo.gif')
self.img_logo = tk.PhotoImage(master=root, file=logo_)
self.style_ttk = ttk.Style()
self.conf = config.Config()
if self.conf('theme'):
self.style_ttk.theme_use(self.conf('theme'))
self.FontMono = self.get_monospace_font()
self.FontStatus = font.Font(size='10', weight='bold')
self.FontTitle = font.Font(size='12', weight='bold')
self.FontInfo = font.Font(size='9', slant='italic')
self.OUTPUT = tk.StringVar()
self.mainframe = ttk.Frame(self.root, padding=5, relief='groove')
self.mainframe.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
# self.mainframe.grid(row=0, column=0, sticky=self.NWES)
# self.mainframe.columnconfigure(1, weight=1)
# self.mainframe.rowconfigure(0, weight=1)