Skip to content

Instantly share code, notes, and snippets.

@akhilman
Created July 21, 2016 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akhilman/5c5a02080d45aef3c8807839c9ff11d4 to your computer and use it in GitHub Desktop.
Save akhilman/5c5a02080d45aef3c8807839c9ff11d4 to your computer and use it in GitHub Desktop.
Tk main window with cement framework
import tkinter as tk
from . import darktheme
class MainWindow(tk.Tk):
def __init__(self):
super().__init__()
self.app = None
def _setup(self, app):
self.app = app
darktheme.setup(self)
self.protocol("WM_DELETE_WINDOW", self.quit)
app.extend('mainwindow', self)
@property
def log(self):
return self.app.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment