Off topic:tkinter window doesn't appear on Visual Studio for Mac
0
0
Entering edit mode
3.4 years ago
caro-ca ▴ 20

I am practicing classes with GUI and tkinter on Visual Studio for Mac. My piece of code is:

#!/usr/bin/env python3
import tkinter as tk

class AddGUI (tk.Frame):
    def __init__ (self):   
        tk.Frame.__init__(self)
        self.master.title('adding one')
        self.define_widgets()
        self.grid()   

my_gui = AddGUI()
my_gui.mainloop()

When I run this script as python3 Tutoriol_Gui.py the script doesn't retrieve anything until I interrupt it meaning that the library is there but I don't know what to do to speed up the process or if something is missing.

$ python3 Tutoriol_Gui.py  ^X^C Traceback (most recent call last):   File "Tutoriol_Gui.py", line 15, in <module>
    my_gui.mainloop()   File "/Users/cacabezas/miniconda3/lib/python3.7/tkinter/__init__.py", line 1283, in mainloop
    self.tk.mainloop(n) KeyboardInterrupt (base)

Additionally, if I run:

#!/usr/bin/env python3  
import tkinter as tk 
root = tk.Tk()
root.mainloop()

I got retrieved a window

I hope you could help me out. I already checked different websites but couldn't find anything useful. Thank you in advance.

visual studio tkinter Python3 • 1.5k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2009 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6