1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Root or window in Python - tkinter?

Discussão em 'Python' iniciado por Stack, Outubro 3, 2024.

  1. Stack

    Stack Membro Participativo

    I'm new in Python and I'm using tkinter to test and learn a few things. I have seen people using root = tk and window = tk so, I was just wondering which one is the best to use, because those two work almost the same. thank you in advice and sorry for my English

    import tkinter as tk
    from tkinter import filedialog, messagebox

    root = tk.Tk()
    root.title('la papu app 2')
    root.iconbitmap(default="icon.ico")

    text = tk.Text(root, wrap='word', undo=True)
    text.pack(expand='yes', fill='both')

    menu_bar = tk.Menu(root)
    root.config(menu=menu_bar)

    ///Rest of the code///

    root.mainloop()

    Continue reading...

Compartilhe esta Página