Python Forum
Python code review | Tkinter gui application
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python code review | Tkinter gui application
#5
(Nov-28-2023, 12:24 AM)menator01 Wrote: You should not do wild card imports eg from tkinter import *. This will cause problems down the road.
Other than that, nicely done.

Hey menator01 in my learning path i understood from few sources that in case i am using one or two classes from a file i should directly import
such as: from tkinter import Tk
but when i use more than a few classes from the same file i should use import * as it easier to use
now i tried to change the import tkinter line and this is what i got
from tkinter import Label, Tk, Entry, Canvas, Frame, Button, PhotoImage, W, E, CENTER, NO, END
now tell me if im wrong but it looks little bit messy and i do not want everytime i call a label or button to use the full path as i would have use if the import was
import tkinter and then each time i use tkiner.Tk() or tkinter.Button()

tell me which way is more correctly to use as i said i am here to learn and accept your reviews
again thanks for your time you can also re-enter my git i have updated the code changed all imports that had * to specific classes execpt import tkinter
Reply


Messages In This Thread
RE: Python code review | Tkinter gui application - by Sr999 - Nov-28-2023, 10:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  GUI application - code review Sr999 3 1,063 Jan-06-2024, 10:14 PM
Last Post: Sr999
  Code review of my rock paper scissors game Milan 0 2,214 May-25-2022, 06:59 AM
Last Post: Milan
  Review on (new) Python module: Function but Lazy Python jeertmans 3 2,636 Nov-01-2021, 06:57 PM
Last Post: ndc85430
  First time python user - Calculator code review Steamy 1 2,418 Jul-22-2020, 05:59 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020