I have a question when it comes to OOP in general, as well as Python in particular. Let's say that I have, for instance, priorities.py - a simple GUI program to manage priorities and there are three classes: Priority, Client, GuiPart:
# priorities.py
# GUI program to manage priorities
from tkinter import *
class Priority:
pass
class GuiPart:
def __init__(self):
self.root = self.createWindow()
def createWindow(self):
root = Tk()
root.resizable(width = False, height = False)
root.title("Priorities")
return root
def display(self):
Label(self.root,
text = "testes").grid(row = 0, column = 1)
class Client:
pass
def main():
g = GuiPart()
g.display()
root = g.root.mainloop()
main()
Should I put def main() outside of any classes, or should I put it in Client class?