BreezypythonGui program is running but the window is not showing up?

439 Views Asked by At

I am just trying to work out some simple programs to get the gist of everything. The program should display a little window that displays "Hello World" but i have come across the problem where my program that uses breezypythongui runs but the window that displays hello world doesn't show up? I tried restarting, updating, and reinstalling anaconda & spyder, but it didn't fix the problem. The program is running in spyder which was downloaded from anaconda. Again, it seems to run with no errors, but the window that displays hello world doesn't show up? I also tryed running it from console but that didn't work either. The code is bellow, as well as a picture showing the code running...

from breezypythongui import EasyFrame

class LabelDemo(EasyFrame):
    
    def __init__(self):
        EasyFrame.__init__(self)
        self.addLabel(text = "Hello World!", row = 0, column = 0)
    
def main():
    LabelDemo().mainloop()

if __name__ == "__name__":
    main()

enter image description here

1

There are 1 best solutions below

5
Carlos Cordoba On

(Spyder maintainer here) According to its docs, breezypythongui is based on Tkinter. Therefore, to make it work, please go to the menu

Tools > Preferences > IPython console > Graphics

and change the Graphics backend there to Tkinter.

After doing that, please run your code again. It should work without problems.