Designing the output method

The last method of the class is the output() method, and it updates the labels found on the bottom frame of the GUI. This simple construct allows us to evaluate processed values and display them if they're string values. As seen on line 273, following the definition of the method and docstring, we check whether theĀ self.processed_unix_seconds value is of the string type.

If it is, then we update the label by calling the text attribute as a dictionary key as seen on lines 274 and 275. This could also be accomplished via the use of the config() method, though in this instance it's simpler to define it in this manner. When this property is changed, the label is immediately updated as the element has already been set by a geometry manager. This behavior is repeated for each label to be updated, as seen on lines 277 through 283:

268     def output(self):
269 """
270 The output method updates the output frame with the
271 latest value.
272 """
273 if isinstance(self.processed_unix_seconds, str):
274 self.unix_sec['text'] = "Unix Seconds: " + \
275 self.processed_unix_seconds
276
277 if isinstance(self.processed_windows_filetime_64, str):
278 self.win_ft_64['text'] = "Windows FILETIME 64: " + \
279 self.processed_windows_filetime_64
280
281 if isinstance(self.processed_chrome_time, str):
282 self.google_chrome['text'] = "Google Chrome: " + \
283 self.processed_chrome_time