New answers tagged

1

One issue I can see on first glance is the *. It's considered bad practice to import everything like that, and here is why from this Stack Overflow post: Because it puts a lot of stuff into your namespace (might shadow some other object from previous import and you won't know about it). Because you don't know exactly what is imported and can't easily find ...


1

You didn't give an example of your text file, maybe that would shed some light on the use of a combo box instead of a text widget. You started out with using self in your class but soon used master. master.combo = Combobox(root) Using self. prefix allows you to access the objects, widgets and any other data in other functions. apple orange banana grape ...


2

if __name__ == "__main__": GUI(root) root.mainloop() instead of def main(): GUI(root) root.mainloop() main() it's the "pythonic" way of accomplishing what you've written.


0

Note: I don't have experience with tkinter, so this will be a review for general code style. I welcome anyone who has experience with tkinter to add their review as well! Class Naming Class names should be in PascalCase, not snake_case. modified_button -> ModifiedButton explorer -> Explorer Constants Littered through your code are strings of hex ...


Top 50 recent answers are included