def __init__(self, language='en'): # Create instance self.win = tk.Tk() self.i18n = I18N(language) # Add a title self.win.title(self.i18n.title) # Callback methods now in different module self.callBacks = Callbacks(self) # Disable resizing the window self.win.resizable(0, 0) # Create a Queue self.guiQueue = Queue() self.createWidgets() # populate Tab 2 Entries self.callBacks.defaultFileEntries() # create MySQL instance # self.mySQL = MySQL() # create Logger instance fullPath = path.realpath(__file__) self.log = Logger(fullPath) # print(self.log) # create Log Level instance self.level = LogLevel()
def __init__(self): # Create instance self.win = tk.Tk() self.i18n = I18N('en') # use English self.i18n = I18N('de') # use German # Add a title self.win.title(self.i18n.title) # self.win.title("Python Graphical User Interface") # w/out importing I18N # Disable resizing the window self.win.resizable(0,0) # Create a Queue self.guiQueue = Queue() self.createWidgets() # populate Tab 2 Entries self.defaultFileEntries()
def test_TitleIsGerman(self): # i18n = I18N('en') # <= Bug in Unit Test i18n = I18N('de') self.assertEqual(i18n.title, 'Python Grafische Benutzeroberfl' + "\u00E4" + 'che')
def test_TitleIsEnglish(self): i18n = I18N('en') self.assertEqual(i18n.title, "Python Graphical User Interface")